bouquins-ror/app/models/preference.rb

17 lines
269 B
Ruby
Raw Normal View History

2015-08-04 11:47:26 +00:00
class Preference
include ActiveModel::Serializers::JSON
extend ActiveModel::Naming
attr_accessor :sort, :term, :per_page, :initial
def attributes=(hash)
hash.each do |key, value|
send("#{key}=", value)
end
end
def attributes
instance_values
end
end