search for: search_column_name

Displaying 1 result from an estimated 1 matches for "search_column_name".

2013 Mar 28
1
undefined method 'sanitize_limit' for #<ActiveRecord::Relation:0x2aaaad35d720>
...gems/activerecord-3.1.12/lib/active_record/relation/finder_methods.rb:376:in `find_first'' /some_package/lib/ruby/gems/1.8/gems/activerecord-3.1.12/lib/active_record/relation/finder_methods.rb:122:in `first'' Error is occurred at the execution of following statement: test = where(search_column_name => attributes[search_column_name]).first I found following solution on internet: https://github.com/rails/rails/issues/1974 Hence updated to: test = where(search_column_name => attributes[search_column_name]).all.to_a.first ...and this statement started working fine. But, find_by_name()...