Sha256: 7cc6eadc099eb6a218908e5789cff36091b7835f6c3409792ccf8710df1f1ff9

Contents?: true

Size: 1.14 KB

Versions: 4

Compression:

Stored size: 1.14 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

4 entries across 4 versions & 1 rubygems

Version Path
active_scaffold-4.0.0 lib/active_scaffold/config/delete.rb
active_scaffold-4.0.0.rc3 lib/active_scaffold/config/delete.rb
active_scaffold-4.0.0.rc2 lib/active_scaffold/config/delete.rb
active_scaffold-4.0.0.rc1 lib/active_scaffold/config/delete.rb