validates :classname, :presence => true, :length => {:maximum => 50}
validates :picture_id, :presence => true, :numericality => true, :existence => {:both => false}
+ before_validation :valid_encode
+
+ def valid_encode
+ ['artist_name', 'classname', 'credit', 'settings'].each do |a|
+ next if attributes[a] == nil
+ raise Pettanr::BadRequest unless attributes[a].valid_encoding?
+ end
+ end
+
def supply_default
end
end
def self.default_page_size
- 25
+ 125
end
def self.max_page_size