Sha256: 5612c43f82fce609ecc47237d366df45f405cee59ed80d3aef3f1b8ed7b03128
Contents?: true
Size: 228 Bytes
Versions: 1
Compression:
Stored size: 228 Bytes
Contents
module KnowledgeBase class Sectionables::Video < ActiveRecord::Base VIDEO_ID_EXPRESSION = %r{^https?://(?:(?:www|m)\.)?youtube\.com/watch\?v=([^&]+)} def youtube_id url[VIDEO_ID_EXPRESSION, 1] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
knowledge_base-0.0.3 | app/models/knowledge_base/sectionables/video.rb |