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.6.5 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.4.1 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.4 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.3 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.2 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.1 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.0 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.0.rc2 lib/active_scaffold/config/delete.rb
active_scaffold-3.6.0.rc1 lib/active_scaffold/config/delete.rb