开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜