Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # schema for model
- create_table "price_lists", :force => true do |t|
- t.integer "user_id"
- t.string "name"
- t.timestamps
- end
- # controller
- def edit
- @price_lists = PriceList.find_by_user_id(current_user.id)
- @gallery = Gallery.find(params[:id])
- end
- # view
- %li
- %label Price List
- = f.collection_select :price_list_id, @price_lists, :id, :name
- # error
- undefined method `map' for #<PriceList:0x219f9f4
- /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/attribute_methods.rb:205:in `method_missing'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_options_helper.rb:180:in `options_from_collection_for_select'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_options_helper.rb:366:in `to_collection_select_tag'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_options_helper.rb:118:in `collection_select'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_options_helper.rb:413:in `collection_select'
- app/views/admin/galleries/_fields.haml:10:in `_run_template_47app47views47admin47galleries47_fields46haml'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compile_and_render_template'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `render_template'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `render_file'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:331:in `render_without_haml'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers/action_view_mods.rb:7:in `render'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/partials.rb:117:in `render_partial'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:26:in `benchmark'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:26:in `benchmark'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/partials.rb:116:in `render_partial'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:352:in `render_without_haml'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers/action_view_mods.rb:7:in `render'
- app/views/admin/galleries/edit.haml:6:in `_run_template_47app47views47admin47galleries47edit46haml'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers/action_view_mods.rb:72:in `call'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers/action_view_mods.rb:72:in `form_for'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers.rb:336:in `call'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers.rb:336:in `haml_bind_proc'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_helper.rb:248:in `fields_for'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/form_helper.rb:184:in `form_for_without_haml'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers/action_view_mods.rb:76:in `form_for'
- app/views/admin/galleries/edit.haml:5:in `_run_template_47app47views47admin47galleries47edit46haml'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers.rb:344:in `call'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers.rb:344:in `capture_haml_with_buffer'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/haml/helpers/action_view_mods.rb:22:in `capture_erb_with_buffer'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/capture_helper.rb:44:in `capture'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/helpers/capture_helper.rb:126:in `content_for'
- app/views/admin/galleries/edit.haml:1:in `_run_template_47app47views47admin47galleries47edit46haml'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `send'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:637:in `compile_and_render_template'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:365:in `render_template'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_view/base.rb:316:in `render_file'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1100:in `render_for_file'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:836:in `render_with_no_layout'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/layout.rb:262:in `render_without_benchmark'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:51:in `render'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1153:in `default_render'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:1159:in `perform_action_without_filters'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:697:in `call_filters'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:689:in `perform_action_without_benchmark'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/rescue.rb:199:in `perform_action_without_caching'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:678:in `perform_action'
- /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/connection_adapters/abstract/query_cache.rb:33:in `cache'
- /Library/Ruby/Gems/1.8/gems/activerecord-2.0.2/lib/active_record/query_cache.rb:8:in `cache'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/caching.rb:677:in `perform_action'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `send'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:524:in `process_without_filters'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/filters.rb:685:in `process_without_session_management_support'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/session_management.rb:123:in `sass_old_process'
- /Library/Ruby/Gems/1.8/gems/haml-1.8.2/lib/sass/plugin/rails.rb:19:in `process'
- /Library/Ruby/Gems/1.8/gems/actionpack-2.0.2/lib/action_controller/base.rb:388:in `process'
- /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
- /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
- /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
- /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:489:in `load'
- /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/servers/mongrel.rb:64
- /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
- /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:342:in `new_constants_in'
- /Library/Ruby/Gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:496:in `require'
- /Library/Ruby/Gems/1.8/gems/rails-2.0.2/lib/commands/server.rb:39
Add Comment
Please, Sign In to add comment