Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # put this in app/models/search.rb
- class Search
- attr_accessor :attributes
- def initialize(attributes = {})
- @attributes = attributes
- @attributes.each do |k,v|
- self.class.send(:define_method,k) { v }
- end
- end
- end
Add Comment
Please, Sign In to add comment