Sha256: 07d8d71a44782892f7bf6de901b7bf9a8db2e56bd6283933e7b45cfe41731417
Contents?: true
Size: 422 Bytes
Versions: 11
Compression:
Stored size: 422 Bytes
Contents
module Kuhsaft class VideoBrick < Brick YOUTUBE = 'youtube' VIMEO = 'vimeo' EXTERNAL = 'external' validates :any_source, :presence => true # a video id, an embed code or a link to a video is required def any_source embed_src.presence || href.presence end def self.source_types [YOUTUBE, VIMEO, EXTERNAL] end def user_can_add_childs? false end end end
Version data entries
11 entries across 11 versions & 1 rubygems