- before_validation :valid_encode
-
- def valid_encode
- ['name', 'caption', 'url', 'settings', 'credit_pictures'].each do |a|
- next if attributes[a] == nil
- raise Pettanr::BadRequest unless attributes[a].valid_encoding?
- end
- end
-
- def supply_default
- end
-
- def overwrite
- end
-
- def self.list
- opt = {}
- opt.merge!(License.list_opt)
- opt.merge!({:order => 'name'})
- License.find(:all, opt)
- end
-
- def self.list_opt
- {:include => {:license_group => {}}}