Sha256: 5f4d52202595c983196362427df92bbe81d7694c2220fbcb480b4b3d670659b6

Contents?: true

Size: 741 Bytes

Versions: 10

Compression:

Stored size: 741 Bytes

Contents

# Holds attribute lists for application models.
# Is used to configure attributes in the layer between a model and its representation in the Netzke application, thus providing default attributes
# for grids and panels.
class NetzkeModelAttrList < NetzkeFieldList

  # Updates attributes for all lists owned by owner_id and below the current authority level
  def self.update_fields(owner_id, attrs_hash)
    super

    NetzkeFieldList.find_all_lists_under_current_authority(owner_id).each do |list|
      list.update_attrs(attrs_hash)
    end
  end

  def self.add_attrs(attrs)
    NetzkeFieldList.find_all_lists_under_current_authority(owner_id).each do |list|
      attrs.each{ |attr_hash| list.append_attr(attr_hash) }
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
netzke-basepack-0.7.4 app/models/netzke_model_attr_list.rb
netzke-basepack-0.7.3 app/models/netzke_model_attr_list.rb
netzke-basepack-0.7.2 app/models/netzke_model_attr_list.rb
netzke-basepack-0.7.1 app/models/netzke_model_attr_list.rb
netzke-basepack-0.6.5 app/models/netzke_model_attr_list.rb
netzke-basepack-0.7.0 app/models/netzke_model_attr_list.rb
netzke-basepack-0.6.4 app/models/netzke_model_attr_list.rb
netzke-basepack-0.6.3 app/models/netzke_model_attr_list.rb
netzke-basepack-0.6.2 app/models/netzke_model_attr_list.rb
netzke-basepack-0.6.1 app/models/netzke_model_attr_list.rb