2009/8/31 Quee Mm <rails-mailing-l...@andreas-s.net>: > > What is the best way to create a drop down where there is no backend > model to get the values from? > > I am currently using: > > <%= f.select(:year_made, ((1980..Time.now.year).collect {|p| [ p, p > ]}).reverse, {:prompt=>"Select a Year"}) %> > > but this gives me issues when I am trying to edit the info as the > currently saved value from the database is lost when edit action is > called. > --
You said at the top that there is no model to get the values from, so how can there be a saved value in the db? Colin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---