In older versions of Rails, what are the methods to say, controller <--> view sharing methods?
I think in newer versions of Rails, there are ways 开发者_开发百科to say, "share these methods between controllers and views" using something like
controller.helper
controller.helper_method
(I am not sure if they are). But what if these methods are missing in older versions of Rails? How can you tell Rails to share methods between controllers and views?
If that's the case then something is probably wrong with your app. helper_method
has been available since Rails 1.0.
http://apidock.com/rails/v1.0.0/ActionController/Helpers/ClassMethods/helper_method
精彩评论