rails new backend --api
ApplicationRecord
Post.where('id = 1').or(Post.where('id = 2'))ActiveSupport.halt_callback_chains_on_return_false = false
ActionController::Renderer 在 controller actions 之外渲染模板,比如 background job 👏redirect_back 代替 redirect_to :back, 而且带一个必需的fallback_location参数#22 楼 @rubyu2 我已经升级了一个 project 到 Rails 5.0.0.beta1,下面几个 Gem 要使用 master 版:
gem 'will_paginate', git: 'https://github.com/jonatack/will_paginate'
gem 'devise', git: 'https://github.com/plataformatec/devise'
gem 'ransack', git: 'https://github.com/activerecord-hackery/ransack'
其余还好,还有就是skip_before_filter要写skip_before_action,API 模式下似乎方法verify_authenticity_token也去除了。