OSDN Git Service

t#29061/t#29089/t#29076:add mylist. modify panel picture
[pettanr/pettanr.git] / app / models / standard_license.rb
1 class StandardLicense < ActiveRecord::Base
2   belongs_to :license
3   
4   validates :license_id, :presence => true, :numericality => true, :existence => true
5   validates :artist_name, :presence => true
6   
7   def supply_default ar
8     self.artist_name = ar.name
9   end
10   
11   def credit
12     {
13       :system_picture_id => self.license.system_picture_id
14     }.to_json.to_s
15   end
16   
17 end