简体   繁体   中英

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

在视图中使用ConstantModelName :: AIRPORT。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM