Sha256: 24087d809bceea6eb180a09a96f9a069d27bdb5948f75ed3015247a1c39c385b

Contents?: true

Size: 672 Bytes

Versions: 55

Compression:

Stored size: 672 Bytes

Contents

#require 'fiona7/write_obj'

module Fiona7
  class EditedObj < WriteObj
    self.configure_for_content(:edited)

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

    if Fiona7.mode == :standalone
      default_scope { where('suppress_export = 0 AND obj_class NOT IN (?)', ['X_Generic', 'X_Image', 'X_Container']) }
    else
      # suppress_export can be misused in legacy mode
      default_scope { where('obj_class NOT IN (?)', ['X_Generic', 'X_Image', 'X_Container']) }
    end

    # disable STI
    self.inheritance_column = :_type_disabled
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.6.1.1.1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.6.1.1.0 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.2.0.2.3 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.2.0.2.1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.2.0.2.2 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.5.5.1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.5.5.0 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.2.0.1.4 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.5.4.1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.5.4.0 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.2.0.1.3 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.5.3.1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.4.3.0 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.3.2.0 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.5.2.0.0 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.2.0.1.1 app/models/fiona7/edited_obj.rb
infopark_fiona7-1.2.0.0.1 app/models/fiona7/edited_obj.rb