Sha256: afa1f7d6661e955d3d4c2fa005991ecd436a463b6b606a0267bb6082c58458e5

Contents?: true

Size: 595 Bytes

Versions: 57

Compression:

Stored size: 595 Bytes

Contents

#require 'fiona7/write_obj'

module Fiona7
  class InternalReleasedObj < WriteObj
    self.configure_for_content(:released)

    has_many :children, :class_name => self.name, :foreign_key => 'parent_obj_id'
    belongs_to :parent, :class_name => self.name, :foreign_key => 'parent_obj_id'

    default_scope do
      now = Time.now.utc.to_iso
      where("is_released = 1 AND suppress_export = 0").where("(valid_from IS NULL or valid_from <= :now) and (valid_until IS NULL or valid_until >= :now)", :now => now)
    end

    # disable STI
    self.inheritance_column = :_type_disabled
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
infopark_fiona7-0.71.1.12 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.11 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.10 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.1 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.0 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.0.7 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.0.6 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.0.4 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.0.3 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.0.2 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.0.1 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.0.0 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.70.0.3 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.70.0.2 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.70.0.1 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.30.0.2 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.30.0.1 app/models/fiona7/internal_released_obj.rb