Sha256: 50a0bb7f93ede47b9150d4ec264478ad4ae07f6f876b63827348867445c6bf90
Contents?: true
Size: 594 Bytes
Versions: 1
Compression:
Stored size: 594 Bytes
Contents
module RailsConnector # The CMS news object # # This class models the join table between channels and objects. # Instances of this class also hold information about validity range. # @api public class News < CmsBaseModel self.primary_key = "news_id" belongs_to :object, :class_name => 'Obj', :foreign_key => 'object_id' def self.table_name "#{table_name_prefix}" "news" end scope :active, -> { where('? BETWEEN valid_from AND valid_until', Time.now.to_s(:number))} scope :for_channel, ->(channel_name) {where(channel_name: channel_name)} end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
infopark_fiona_connector-7.0.1.5.2.3.rc4 | lib/rails_connector/news.rb |