Rails3
sqlite3ãç¡ãã£ã¦æã rake db:migrate:status rake aborted! LoadError: Please install the sqlite3 adapter: `gem install activerecord-sqlite3-adapter` (sqlite3 is not part of the bundle. Add it to Gemfile.) Gemfileã«ãgem 'sqlite3'ãã¨è¨è¿°ãâ¦
Aptanaã®ã¿ã¼ããã«ã§æããã $ rails sh.exe": rails: command not foundãªãã§ï¼ ã²ã ã確èªããã¨ã»ã»ã»ãªã gem list (railsããªãï¼gem install rails --version 3.2.19 bundle install ï¼ã ãã ãï¼ An error occurred while installing json (1.7.4)â¦
search.html.erbã¨ãã§Formããã£ã¦ãsubmit_tagã¨ãããããã ãã®ãã¼ã¸ã®ä¸ã«toggleã使ã£ã¦è¡¨ç¤ºããã¦ãããç¥ããããããã§ããããã£ã¦submitããã¨ãã«toggleã®ç¶æ ãç¶æãã¦ãããªãã®ã§é表示ã«ãã¦ãã¦ã表示ããã¦ãã¾ãã # search.html.erb <div id="toggle"></div>â¦
ãã¾ã¾ã§ã®ã³ã¼ã @hoge=Hoge.new(params[:hoge]) if @hoge.save if è¤æ°ãã¼ã¿ã®æ¡ä»¶ [email protected] #è¤æ°ãã¼ã¿ã®å å·¥ begin fuga.save! rescue ActiveRecord::RecordInvalid flash[:notice]="失æããï¼" render :action=>:new return end end else rendâ¦
ç¡è¶ãªæ¸ãæ¹ã ã¨ãã¼ãã«ã®ã«ã©ã ï¼=modelï¼ã«è©²å½ããªãform_tagã®å¤ã¨ããæ¤è¨¼ããããä»åã¯1件ã®ãã£ã¼ã«ãã§æ©ãã§ãã¾ããapp/models/hoge.rbã®ä¸ã§ã¯paramsã®å©ç¨ãã§ããªãã®ã§æ©ãã rails 㧠params ã«å¯¾ãã¦è¤éãªå¦çãããã¨ãã®ãã¹ããã©ã¯â¦
Windows7ã«å¤ããã¼ã¸ã§ã³ã§ç°å¢ãæ§ç¯ããã®ã§ã¡ã¢ MySQL5.5 ãã¦ã³ãã¼ã http://dev.mysql.com/downloads/windows/installer/ã«ã¢ã¯ã»ã¹ ãLooking for previous GA versionï½ï¼ãã¯ãªã㯠MySQL5.5ã確èªãã¦Download ãLoginããSign Upãã§ã¯ãªããNo â¦
ç°å¢æ§ç¯æé æ¸ãä½ã£ã¦ããã Ruby1.9.3ã¤ã³ã¹ãã¼ã« RubyGemsæ´æ° Rubyã®Development Kitã¤ã³ã¹ãã¼ã« Rails3.2.19ã¤ã³ã¹ãã¼ã« MySQL5.6ã¤ã³ã¹ãã¼ã« mysql2ã®ã¤ã³ã¹ãã¼ã«ã»ã»ã»errorã§å ¥ããªãï¼ ã©ãããMySQL5.6ã§å ¥ããã¨NGã§5.5ã«æ»ãã¦ããã ã¨å ¥â¦
ææ«ãæ¥ææ¥ã ã¨è¡¨ç¤ºãããªãåé¡ããã£ã¨ããã£ãããããRedmineã®ã«ã¬ã³ãã¼æµç¨ã¾ã¨ããããã¡ã«ãªã£ã¦ããªããã¡ããã¨æ¸ããªããã¦ã¿ãã redmine203ã®å°å ¥ redmineããDLãã¦å±é i18n.rb redmine203/lib/redmine/i18n.rb ã app/lib/redmine/i18n.râ¦
ã«ã¬ã³ãã¼æ¬ä½ã«ä»è¾¼ãã®ã¯ãããã search.html.erb ãããªæãããªï¼ <%= fields_for(:cond) do |r| -%> <input type="button" id="Ago" name="Ago" value="å ã¶æå" class="button_link" /> <%= r.text_field :day_from, :size=>"15", :class=>"datepicker" %> hoge.js æ¥ä»ãåå¾ãã¦Dateåã«å¤æãã¦å¦çãã¦ããè¾¼ããå¤æã®ã¨ããã£ã¦â¦
ããã¹ãããã£ããã¨ãããªãã°å¤§ä¸å¤«ãã¨èãããã©ãã£ããã¨ãã£ããã¨ããªãã®ã§ãã£ããã¨ãã£ã¦ã¿ããã ãã¼ãã«ãåé¤ãã migrationã§ä½ã£ã¦ã¿ããã©ãã£ã±ã使ããªãã¨ãªã£ãå¤ããã¼ãã«ãåé¤ããã kenmituo@HOGE /c/Users/kenmituo/My Documeâ¦
Railsã§æ¥ä»ãã©ã¡ã¼ã¿ãåãåã£ã¦å¤å®ãã¦ãã¡ã ã£ããä»æ¥ã®æ¥ä»ã«ããã»ã»ã»ãããªå¼ã¯ããæ¸ãã #2014-5-1 if params[:day] d=params[:day].split(/-/) if Date.valid_date?(d[0].to_i, d[1].to_i, d[2].to_i) chkday = Time.parse(params[:day]).to_dâ¦
Rails3.2ã«ãã¦ããã®ä¸çªã®ãæ°ã«å ¥ãã«ãªã£ããcontent_tagãã§ããããã¹ãã¨ãå ¥ãåæ§é ã«ããã¨çæããã¿ã°ããã®ã¾ã¾ç¾ããããã¦ã¬ãã«ãªãã¦ããã®ã§èª¿ã¹ç´ããã åç´ãªã¿ã°ä½æä¾ï¼ã¡ãã»ã¼ã¸ã¯2çªããããªãã¨ã¨ã©ã¼ã«ãªã£ãï¼ content_tag :diâ¦
å°å·ããã¨ãç¨ã®ãã¶ã¤ã³ã¨ããããä¸è¦ãªé¨åãåé¤ãããã¨ããå§ã¾ã£ã¦æ©ã¿å§ããã®ã§ã¡ã¢ãã ãµã¤ãã®HTML+CSSãªæ§æ CSSã§ç¹å®ã®é¨åãå°å·ããªãè¨å®ã«ããã«ã¯ @media print{ #test { display:none; } }æ®éã®HTMLã ã£ãããããªæãã ãã®å»¶é·ã§aâ¦
Railsã®cloneã¨dup ActiveRecord ãªãã¸ã§ã¯ããã³ãã¼ãã 調æ»ãã¦ã¿ãã @m_clone = Media.find(params[:id]).clone @m_dup = Media.find(params[:id]).dupãã®2ã¤ã®æ±ºå®çãªéãã¯ãidãã®æç¡ã ã¨ãããããcreater_atããupdated_atãã¯nilã«ãªã£ã¦ãâ¦
Sysprep+Ghostããããªãããªã®ã§ãã¡ããã¡ãã«ãªããããAptana - SVNãªãã¸ããªï¼å³ã¯ãªãã¯ã®æ°è¦-ãªãã¸ããªã¼ã»ãã±ã¼ã·ã§ã³ãURLã ãªãã¸ããªãããã©ã«ãã¼é¸æï¼å³ã¯ãªãã¯ããã§ãã¯ã¢ã¦ãã cd \C:\workspace\hoge >gem update rails -v 3.2.17 â¦
ã«ãã´ãªã¼ï¼é¸æè¢ï¼ã¨ã¡ã¢ï¼èªç±å ¥åï¼ããããããªDBã®å ¥åãã©ã¼ã ãããã¨ãã¦ãé »ç¹ã«å ¥åããå®åæãå¶ã«ç¾ãããå£ç¯çãªã¢ããªã®ã§ã«ãã´ãªã¼ã«å«ããã®ã¯ããããã¨ãããéè¨ã®é¢ä¿ãããã®ã§å ¥ããããªãã ããã§å®åæãã£ã¼ã«ããä½æãã¦ãâ¦
ããªããã§ã¯ãªãã¦ããã¾ã¼ã«ã¨ã©ã¼ã¡ã¼ã«ãé£ãã§ããããã¾ã£ã¦ããã An ActionView::Template::Error occurred in hoges#create: undefined method `model_name' for NilClass:Class activemodel (3.1.8) lib/active_model/naming.rb:155:in `model_namâ¦
ããã°ãä½ãã®æ¹é ãã³ã¡ã³ãã®ä»¶æ°ã表示ããããã #ã³ã³ããã¼ã©ã¼ #ããã def top @weblogs=Weblog.paginate(:page=>params[:page], :per_page=>5, :include=>:webleafs, :order=>'id DESC') end#ãã¥ã¼ <%- for @weblog in @weblogs %> <div class="post"> <%= render :</div>â¦
å人çã«ã¯å¤ã®æ¤è¨¼ãªãã¦ä¸è¦ã ã¨æã£ã¦ãããã©ãæ¥æåãç¡è¦ãã¦å ¥åããäºä¾ãç¨ã«çºçããããããã©ããã£ã¦ãããã ããï¼æ®éã¯ã¢ãã«ã®validatesã§æ¸ããã©ãæ¥æï¼æéã§å¤èª¿æ´ãã³ã³ããã¼ã©ã¼ã§è¡ã£ã¦ããã®ã§ãã¡ãæªãããããªã³ã¼ããæ¸ããâ¦
ã¢ãã«ã«é¢ä¿ãªãè¦ç´ ã£ã¦ããã®ã§form_forã®ä¸ã«ãããªã®ãå ¥ãã¦ããã #ãã¥ã¼ <%= text_field(:series, :reserve, :class=>"datepicker") %>ã³ã³ããã¼ã©ã¼ã§ã¯ params[:series][:reserve] ã£ã¦ãªæãã§å¤ãã¨ããã®ã§ã¨ã·ã¨ã·ã¨ããã£ã¦ããããå¤ãã»â¦
ä¸æ¬åé¤ã§æ¤ç´¢ããçµæã£ã¦å°ãªãã¨æãã views/rentals/search.html.erb æ¤ç´¢çµæãform_tagã§å²ã #ä¸é¨æç² <%= form_tag(:action=>:confirm, :name=>"ChooseForm") do %> <table> <%== result_title_tip -%> <%= render(:partial=>'result', :collection=>@re</table>â¦
å 容ã¯å¤ãããªããã https://code.google.com/p/railswhere/ Rails3ã§Whereã使ããããä¸è¦ãããããªããã©ã便å©ãªã®ã§ä½¿ã£ã¦ããã è¤æ°ã®æ¡ä»¶ãçµã¿åãããã¨ããã§è¦å´ãã w = Where.new w.and_not { |ww| ww.or "x=1" ww.or "x=2" ww.or "x=3" } â¦
åç´ãªããã°ãä½ããã¨ãç®æ¨ã«ãã¦ã¿ã ãã¤ã°ã¬ã¼ã·ã§ã³ãã¡ã¤ã« weblogsãè¨äºãwebleafsãã³ã¡ã³ãã«ãã¾ãï¼postã¨commentã ã¨æåæ°ãå¤ãã®ã§ãããï¼ rails generate migration CreateWeblogsdb/migrate/ã»ã»ã»create_weblogs.rb class CreateWebloâ¦
大éæãããä¾ departure = Time.local(check.year, check.month, check.day, check.hour, check.min)ãã®ã¾ã¾åºãã¨ãããªæãã«ãªã£ãã 2013-02-26T13:30:00+00:00 datetimepickerã§ä½¿ããããã«ããããã«ãæ«å°¾ã«è¿½å .strftime("%Y-%m-%d %H:%M")
Rails2ã®é ã«ä½¿ã£ã¦ãããobserve_fieldãã使ããªãã¦æ©ãã§ãã¦èª¿ã¹ã㨠Railsã§ã³ã³ãããã¯ã¹ãé£åããããµã³ãã« ã¨ããã®ãè¦ã¤ãããå®è£ ãé¢åããããã ãããªã¨ãã¯ç¡çç¢çå®è£ ãã ã³ã³ããã¼ã©ã¼ def new @ar = ArticleRental.new @category â¦
faviconã¯å¬åããªãã¨ä½¿ããªããããã favicon_link_tag 'favicon.ico' %> Railsã®ãã¼ã¸ã§ã³ã«ãã£ã¦ç°ãªãã®ããpublic/favicon.icoã«è¨ç½®ãã¦ãã ãã ã£ããçæããããã¼ã¸ãè¦ãã¨ã³ã£ãã ãassetsããã¤ãã¦ã¾ãããªã app/assets/images/favicon.â¦
YAMLãã¡ã¤ã«ã便å©ãªã®ã§éæ¹é ãã¦ããããããªã®ãåºã¦ãã Nested I18n namespace lookup under "activerecord.attributes.patrol" is no longer supportedé常ç¶æ ja: activerecord: attributes: patrol: id: 'ID'éæ¹é ï¼ ja: activerecord: attributâ¦
æ» å¤ã«ãããªãããï¼ $ rails generate migration CreatePatrolsç·¨éãã class CreatePatrols < ActiveRecord::Migration def change create_table :patrols do |t| t.integer :campus, :null=>false #ãã£ã³ãã¹ t.integer :staff_id, :null=>false #ã¹ã¿â¦
rails3.1.3ããrails3.1.8ã«å¤æ´ãã¦ããã®è¦å´ãã¦ããã¨ãããè¦åãåºã¦ãã c:/Ruby193/lib/ruby/gems/1.9.1/gems/activesupport-3.1.8/lib/active_support/core_ext/string/output_safety.rb:23: warning: regexp match /.../n against to UTF-8 stringâ¦
ã¯ããã«ãmodelã§ã¹ãã¼ã¯ã±ã¼ã¹ã使ãã®ã¯æ¢ãã¦ãããæ¹ããããããããã¨é¢åãªã®ã ã åèï¼Rails 3ã§ã®ãªã¼ãã³ã³ããªã¼ããæ軽ã«å®ç¾ãã rails3-jquery-autocomplete Rails3.1ç³»ã§ãã ã¤ã³ã¹ãã¼ã« Gemfile gem 'rails3-jquery-autocomplete' ã¿â¦