I cant find the issue here. #helpers/search_helper.rb def range1 @range = [] (10000..1000000).step(10000).each {|x| @range << ["value" => x, "name" => x] } return @range end Code (markup): #views/search/index.html.erb <%= select_tag "state", options_from_collection_for_select(range1, "value","name"), :prompt => "Select State" %> Code (markup): I got an undefined method `value' for [{"value"=>10000, "name"=>10000}]:Array
Done. I just change the helper to @range << [number_to_currency(x,:unit => "$"), x] Code (markup): and the view to select_tag "state", options_for_select(range1), :prompt => "From" Code (markup):