Sha256: 2a0c5504ab56916c3a234bc11c35a17b4eeafc482acb1e42e4146557f3feb38e

Contents?: true

Size: 1.24 KB

Versions: 60

Compression:

Stored size: 1.24 KB

Contents

module ActiveScaffold::Config
  class Update < ActiveScaffold::Config::Form
    self.crud_type = :update
    def initialize(*args)
      super
      self.nested_links = self.class.nested_links
      self.refresh_list = self.class.refresh_list
    end

    # global level configuration
    # --------------------------
    # the ActionLink for this action
    def self.link
      @@link
    end
    def self.link=(val)
      @@link = val
    end
    @@link = ActiveScaffold::DataStructures::ActionLink.new('edit', :label => :edit, :type => :member, :security_method => :update_authorized?)

    # whether we should refresh list after update or not
    cattr_accessor :refresh_list
    @@refresh_list = false

    # instance-level configuration
    # ----------------------------

    # the label= method already exists in the Form base class
    def label
      @label ? as_(@label) : as_(:update_model, :model => @core.label(:count => 1))
    end

    attr_accessor :nested_links
    cattr_accessor :nested_links
    @@nested_links = false

    attr_writer :hide_nested_column
    def hide_nested_column
      @hide_nested_column.nil? ? true : @hide_nested_column
    end

    # whether we should refresh list after update or not
    attr_accessor :refresh_list
 
  end
end

Version data entries

60 entries across 60 versions & 4 rubygems

Version Path
active_scaffold_vho-4.0.0 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.14 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.13 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.12 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.11 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.10 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.9 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.8 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.7 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.6 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.5 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.4 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.3 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.2 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.1 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.2.0 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.31 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.1.8 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.30 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.29 lib/active_scaffold/config/update.rb