Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 791727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T21:53:00+00:00 2026-05-14T21:53:00+00:00

My error: Notice the undefined method ‘-@’ . This is for a sort by.

  • 0

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)

Here is the code from my Organization_Controller:

def search
params[:q] = ” if params[:q] == ORGANIZATION_SEARCH_TEXT

s = Sunspot.search Organization do |query|
  query.with(:searchable).equal_to 'true'
  query.with(:updated_at).greater_than Time.zone.now-12.months
  query.paginate :page => (params[:page] && params[:page].to_i || 1), :per_page => 20
  query.keywords(params[:q]) { phrase_fields :quick_description => 3.0, :name => 3.0 } unless params[:q].blank?
  -# query.keywords(params[:q]) { phrase_fields :name => 3.0 } unless params[:q].blank?
  -# :name , :city
  query.order_by(params[:order_by], params[:direction] || 'asc') if params[:order_by] && params[:order_by] != 'distance'                 -# <-------- This is line 190 / this comment is not in the real code
  query.order_by('content_score', 'desc') if params[:q].blank?
end
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T21:53:01+00:00Added an answer on May 14, 2026 at 9:53 pm

    I just found out how stupid I am! 😀

    You can’t comment things in a controller with -# !

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't know when it happened but I'm getting this error NoMethodError (undefined method
I have this error NOTICE: UNDEFINED VARIABLE: LOGO IN C:\WAMP\WWW\SITE\TOOLS\SMARTY\SYSPLUGINS\SMARTY_INTERNAL_DATA.PHP ON LINE 291 CALL
I keep getting an Notice: Undefined index: did error with this query, and I'm
My Rails app is generating this error whenever validation aren't met: undefined method `model_name'
How can you easily avoid getting this error/notice in PHP? Notice: Undefined index: test
I get this error when trying to register a new user. NoMethodError (undefined method
This is the error: NoMethodError in VideosController#update undefined method `each' for #<Topic:0x1032ee330> This is
I have this error again: Notice: Undefined index: IDNUMBER in E:\wamp\www\PHP\create.php on line 5
The site is working fine but I notice this error showing up in my
I'm getting this error: undefined method `post_comments_path' for #<#<Class:0x1052a6e98>:0x1052a4be8> Extracted source (around line #27):

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.