开发者

Ruby on Rails :How can constants availables to my views

module ConstantModelName
  AIRPORT =  "Airport"
end

This module is in lib folder of my app.

I want avialble this constant(AIRPORT) value to my views.

Is this possible? If 开发者_运维问答Yes, how can i do this?

Thanks in advance


Use ConstantModelName::AIRPORT in your views.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜