How do I Include an array from model in views

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How do I Include an array from model in views

fugee ohu
 ITEM_TYPES =  ['General', 'Book', 'Record', 'Magazine', 'Pez dispenser', 'CD', 'VHS casette']
Now I wanna use ITEM_TYPES in my view but rails says

undefined method `ITEM_TYPES' for #<Class:...>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/91b6e184-aa15-4da4-b567-d567005c9e6d%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: How do I Include an array from model in views

Ariel Juodziukynas
SomeClass::ITEM_TYPES

El jue., 3 oct. 2019 a las 19:25, fugee ohu (<[hidden email]>) escribió:
 ITEM_TYPES =  ['General', 'Book', 'Record', 'Magazine', 'Pez dispenser', 'CD', 'VHS casette']
Now I wanna use ITEM_TYPES in my view but rails says

undefined method `ITEM_TYPES' for #<Class:...>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/91b6e184-aa15-4da4-b567-d567005c9e6d%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPS3bcDnkL6vFNizeN%2BWrMw061tnrcwYYUcd3_5R092JK3LZGA%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: How do I Include an array from model in views

fugee ohu
In reply to this post by fugee ohu


On Thursday, October 3, 2019 at 6:25:08 PM UTC-4, fugee ohu wrote:
 ITEM_TYPES =  ['General', 'Book', 'Record', 'Magazine', 'Pez dispenser', 'CD', 'VHS casette']
Now I wanna use ITEM_TYPES in my view but rails says

undefined method `ITEM_TYPES' for #<Class:...>

Thanks

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c166adfc-d6dd-4d58-92c9-1578f57391cc%40googlegroups.com.