开发者

Ruby on Rails :How can constants availables to my views

开发者 https://www.devze.com 2023-01-13 03:21 出处:网络
module ConstantModelName AIRPORT =\"Airport\" end This module is in lib folder of my app. I want avialble this constant(AIRPORT) value 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

精彩评论

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