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-3.1.6 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.28 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.1.5 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.27 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.1.4 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.26 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.25 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.1.3 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.1.2 lib/active_scaffold/config/update.rb
active_scaffold-3.0.26 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.1.1 lib/active_scaffold/config/update.rb
active_scaffold-3.0.25 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.24 lib/active_scaffold/config/update.rb
active_scaffold_clarity-3.0.24.2 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.1.0 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.23 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.22 lib/active_scaffold/config/update.rb
active_scaffold-3.0.24 lib/active_scaffold/config/update.rb
active_scaffold_vho-3.0.21 lib/active_scaffold/config/update.rb
active_scaffold-3.0.23 lib/active_scaffold/config/update.rb