Sha256: ce72135f01326aff264672b89bb86e285d804af2321f9d3edc53b4fecae62ef1

Contents?: true

Size: 1.12 KB

Versions: 29

Compression:

Stored size: 1.12 KB

Contents

module ActiveScaffold::Config
  class Delete < Base
    self.crud_type = :delete

    def initialize(core_config)
      super
      @refresh_list = self.class.refresh_list
    end

    # global level configuration
    # --------------------------

    # the ActionLink for this action
    cattr_accessor :link, instance_accessor: false
    @@link = ActiveScaffold::DataStructures::ActionLink.new(
      'destroy',
      :label => :delete,
      :type => :member,
      :method => :delete,
      :crud_type => :delete,
      :confirm => :are_you_sure_to_delete,
      :position => false,
      :parameters => {:destroy_action => true},
      :security_method => :delete_authorized?,
      :ignore_method => :delete_ignore?
    )

    # whether we should refresh list after destroy or not
    cattr_accessor :refresh_list, instance_accessor: false
    @@refresh_list = false

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

    # the ActionLink for this action
    attr_accessor :link

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

    undef_method :new_user_settings
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
active_scaffold-3.7.8 lib/active_scaffold/config/delete.rb
active_scaffold-3.7.7 lib/active_scaffold/config/delete.rb
active_scaffold-3.7.6 lib/active_scaffold/config/delete.rb
active_scaffold-3.7.5 lib/active_scaffold/config/delete.rb
active_scaffold-3.7.2 lib/active_scaffold/config/delete.rb
active_scaffold-3.7.1 lib/active_scaffold/config/delete.rb
active_scaffold-3.7.0 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.20 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.19 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.17 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.15 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.14 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.13 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.12 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.11.1 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.11 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.10 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.9 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.8 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.6 lib/active_scaffold/config/delete.rb