How do I Include an array from model in views

148 views
Skip to first unread message

fugee ohu

unread,
Oct 3, 2019, 6:25:08 PM10/3/19
to Ruby on Rails: Talk
 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:...>

Ariel Juodziukynas

unread,
Oct 3, 2019, 6:34:25 PM10/3/19
to rubyonra...@googlegroups.com
SomeClass::ITEM_TYPES

--
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 rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/91b6e184-aa15-4da4-b567-d567005c9e6d%40googlegroups.com.

fugee ohu

unread,
Oct 3, 2019, 6:39:20 PM10/3/19
to Ruby on Rails: Talk
Thanks
Reply all
Reply to author
Forward
0 new messages