參考一
這次用到的最終方式(來源)
before_filter :only => :show do |controller| controller.instance_eval do redirect_to edit_object_path(params[:id]) # method撰寫區 end end
Client does not support authentication protocol requested by server; consider upgrading MySQL client
mysql> update mysql.user set password=OLD_PASSWORD('abc') where user='root';
mysql> flush privileges;
ruby script/server --port AAAA -e development --binding=100.100.0.100如果改為
ruby script/server --port AAAA -e development --binding=100.100.0.100 -d那就能直接在後台跑(要移除再用kill -9指令
mongrel_rails start -d -p 8000 -e production -P /full/path/to/log/mongrel-1.pid但這招還沒實作過
<% form_tag '' , :method => 'get' do %>
I18n.load_path += Dir[ File.join(RAILS_ROOT, 'lib', 'locale', '*.{rb,yml}') ]
I18n.default_locale = "zh-TW"
gem install mysql -- --with-mysql-include=/opt/lampp/bin/mysql --with-mysql-config=/opt/lampp/bin/mysql_config
decimal set_primary_key :你要的id名
來源教學
以上方式改了後.原慣例REST和CRUD就可直接套.不用再多做修改(by 多做修改的笨蛋)
另附網址mapping改法