最近项目打算从1.9.3升级到2.1.1, 目前线上同时跑着1.9.3和2.1.1,但是发现define_method在2.1.1下面生成的方法不再是public,而是根据上下文来判断.比如以下代码:class A
private
define_method :foo do
puts 'foo from A'
end
end
class B
...
查看更多
HTTP status codes and their respective Rails symbol representations. For example, :not_found can be used instead of 404 in a render call:render :file => '404.html.erb', :status => :not_found1xx Informational:...
查看更多