fix channel validation error

This commit is contained in:
Lee Lawlor
2015-02-12 14:00:15 -05:00
parent 286519d86b
commit e25885a96e
3 changed files with 3 additions and 17 deletions

View File

@ -76,7 +76,7 @@ class Channel < ActiveRecord::Base
before_destroy :delete_feeds
validates :video_type, :presence => true, :if => lambda{ |channel| channel.video_id.present? }
validates :video_type, :presence => { :message => I18n.t(:channel_video_type_blank) }, :if => lambda{ |channel| channel.video_id.present? }
scope :public_viewable, lambda { where("public_flag = true AND social != true") }
scope :not_social, lambda { where("social != true") }