Displaying 1 result from an estimated 1 matches for "maximum_price".
2010 Dec 25
1
Advanced search without database
...1 *
*For those who may not know, if you don''t want to save your searches in the
database, but would like all benefits of using an AR model (like
validations), you can use virtual attributes:*
*class Search < ActiveRecord::Base
attr_accessor :keywords, :category_id, : minimum_price, :maximum_price
validates_presence_of :keywords
# blah...
end*
*Everything works the same, just doesn''t save anything. And no need for a
migration or ''searches'' table in db.*
But i tried it, and when i put the att_accessors in my model and try to make
the search, the search returns...