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-1.2.0.0.0 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.9 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.8 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.7 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.6 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.5 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.4 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.3 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.2 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.10 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.1 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-1.1.0.0.0 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.9 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.8 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.7 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.6 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.5 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.4 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.3 app/models/fiona7/internal_released_obj.rb
infopark_fiona7-0.71.1.2 app/models/fiona7/internal_released_obj.rb