validates :panel_id, :numericality => {:allow_blank => true}
validates :picture_id, :numericality => true, :existence => {:both => false}
- validates :link, :length => {:maximum => 200}, :url => {:allow_blank => true, :message => I18n.t('errors.messages.url')}
+ validates :link, :length => {:maximum => 200}, :allow_blank => true
+ #validates :link, :length => {:maximum => 200}, :url => {:allow_blank => true, :message => I18n.t('errors.messages.url')}
validates :x, :presence => true, :numericality => true
validates :y, :presence => true, :numericality => true
validates :width, :presence => true, :numericality => true, :not_zero => true, :reverse => true, :sync_vh => true
{:include => {:panel => {:author => {}}, :picture => {:artist => {}, :license => {}}}}
end
+ def disp_link
+ if self.link =~ /\:\/\//
+ self.link
+ else
+ '/' + self.link.to_s
+ end
+ end
+
def scenario
if caption.blank?
''