belongs_to :system_picture
belongs_to :artist
has_one :resource_picture
+ has_one :resource_picture_pictures
validates :original_picture_id, :presence => true, :numericality => true, :existence => {:both => false}
validates :revision, :presence => true, :numericality => true
validates :license_id, :presence => true, :numericality => true, :existence => {:both => false}
validates :system_picture_id, :presence => true, :numericality => true, :existence => {:both => false}
validates :artist_id, :presence => true, :numericality => true, :existence => {:both => false}
- validates :artist_name, :presence => true
- validates :license_group_classname, :presence => true, :length => {:maximum => 50}
+ validates :license_group_module_name, :presence => true, :length => {:maximum => 50}
def supply_default
end
attr = {:width => rp.width, :height => rp.height, :ext => rp.ext, :filesize => rp.filesize,
:original_picture_id => rp.original_picture_id, :license_id => rp.license_id,
:system_picture_id => rp.system_picture_id, :artist_id => rp.artist_id,
- :md5 => rp.md5, :artist_name => rp.artist_name,
- :license_group_classname => rp.license_group_classname,
+ :md5 => rp.md5,
+ :license_group_module_name => rp.license_group_module_name,
:license_group_settings => rp.license_group_settings,
:credit_picture_settings => rp.credit_picture_settings,
:license_settings => rp.license_settings
end
def credit_template
- "#{self.license_group_classname.tableize}/attributes/credit"
+ "#{self.license_group_module_name.tableize}/attributes/credit"
end
def full_credit_template
- "#{self.license_group_classname.tableize}/attributes/full_credit"
+ "#{self.license_group_module_name.tableize}/attributes/full_credit"
end
end