There is a constant called ENVIRONMENTS
validates :environment, inclusion: ENVIRONMENTS
with these associated constants and strings
ENVIRONMENT_INTERNAL="internal"
ENVIRONMENT_STAGING="staging"
ENVIRONMENT_PRODUCTION="production"
ENVIRONMENTS=[ENVIRONMENT_INTERNAL,ENVIRONMENT_STAGING,ENVIRONMENT_PRODUCTION]
I am trying to build a collection select which shows the strings related to the constants. How do I do it? This is how I have tried to do it
=f.input :envrionment, as: :select, collection: [ENVIRONMENTS]