Active record NEW causing a warning

Posted by Jon on Stack Overflow See other posts from Stack Overflow or by Jon
Published on 2010-03-22T12:46:31Z Indexed on 2010/03/22 12:51 UTC
Read the original article Hit count: 276

I got this snippet of controller code from Railscast 193, functionally its all working, but i am getting a warning message. http://railscasts.com/episodes/193-tableless-model

@search = Search.new(:text => params[:search])

getting warning:

/Users/Server/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/named_scope.rb:13: warning: multiple values for a block parameter (0 for 1)
from /Users/Server/.gem/ruby/1.8/gems/activerecord-2.3.4/lib/active_record/named_scope.rb:92

Any ideas why i am getting the warning? thanks

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about controller