What might be causing this Rails method error?
Posted
by Trip
on Stack Overflow
See other posts from Stack Overflow
or by Trip
Published on 2010-05-13T19:49:32Z
Indexed on
2010/05/13
19:54 UTC
Read the original article
Hit count: 216
ruby-on-rails
|mysql
My error:
Notice the undefined method '-@' .
This is for a sort by. All sorts on one page break, but all the sorts on other pages use the same helper and do not break. Does it allude to something obvious?
Processing OrganizationsController#search (for ::1 at 2010-05-13 15:42:01) [GET]
Parameters: {"action"=>"search", "controller"=>"organizations", "direction"=>"desc", "_"=>"1273779721464", "order_by"=>"published_at"}
SQL (0.5ms) SHOW TABLES
Organization Columns (2.2ms) SHOW FIELDS FROM `organizations`
NoMethodError (undefined method `-@' for #<Array:0x2f88cc8>):
app/controllers/organizations_controller.rb:190:in `search'
sunspot (1.0.5) lib/sunspot/util.rb:84:in `call'
sunspot (1.0.5) lib/sunspot/util.rb:84:in `instance_eval_or_call'
sunspot (1.0.5) lib/sunspot/search.rb:200:in `build'
sunspot (1.0.5) lib/sunspot/session.rb:45:in `new_search'
sunspot (1.0.5) lib/sunspot/session.rb:53:in `search'
sunspot (1.0.5) lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `search'
sunspot (1.0.5) lib/sunspot.rb:323:in `search'
app/controllers/organizations_controller.rb:183:in `search'
haml (2.2.2) [v] rails/./lib/sass/plugin/rails.rb:19:in `process'
lib/flash_session_cookie_middleware.rb:14:in `call'
vendor/gems/hoptoad_notifier-2.2.2/lib/hoptoad_notifier/rack.rb:27:in `call'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
/usr/local/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
/usr/local/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
/usr/local/lib/ruby/1.8/webrick/server.rb:95:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `each'
/usr/local/lib/ruby/1.8/webrick/server.rb:92:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:23:in `start'
/usr/local/lib/ruby/1.8/webrick/server.rb:82:in `start'
Rendered rescues/_trace (68.5ms)
Rendered rescues/_request_and_response (0.6ms)
Rendering rescues/layout (internal_server_error)
© Stack Overflow or respective owner