ruby on rails - select_tag isn't working in the show action, only in index -


rails newbie here. following code works in index action, not show(which need it)

<%= select_tag "name_dropdown", options_from_collection_for_select(@models, "friendly_id", "name") %>

the @models causing trouble here.. know how hshould tackle problem?

*edit forgot add following code in show action of models_controller.rb. fixd problem. wizard of ogz!

@models = model.all


Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -