2013-03-14から1日間の記事一覧
(Rails3.2.12)ファイル作成して下記のようにするapp/controllers/registrations_controller.rb class RegistrationsController < Devise::RegistrationsController protected def after_update_path_for(resource) hoge_path end end
問題 ブーリアン値 hoge が ture 以外を検索したい DBの状態 dbにカラム foobar で nil x5、false x1、true、x0。 true以外が計6コ。 User.where(:foobar => nil).count (0.3ms) SELECT COUNT(*) FROM `users` WHERE `users`.`foobar` IS NULL => 5 User.whe…