Class: ActiveScaffold::Config::Delete

Inherits:
Base show all
Defined in:
lib/active_scaffold/config/delete.rb

Constant Summary collapse

ActiveScaffold::DataStructures::ActionLink.new('destroy', :label => :delete, :type => :member, :confirm => :are_you_sure_to_delete, :method => :delete, :crud_type => :delete, :position => false, :parameters => {:destroy_action => true}, :security_method => :delete_authorized?, :ignore_method => :delete_ignore?)
@@refresh_list =
false

Instance Attribute Summary collapse

Attributes inherited from Base

#action_group, #user

Instance Method Summary collapse

Methods inherited from Base

#crud_type, #formats, #formats=, inherited, #label

Methods included from ActiveScaffold::Configurable

#configure, #method_missing

Constructor Details

#initialize(core_config) ⇒ Delete

Returns a new instance of Delete.



5
6
7
8
9
10
# File 'lib/active_scaffold/config/delete.rb', line 5

def initialize(core_config)
  super
  # start with the ActionLink defined globally
  @link = self.class.link.clone
  @refresh_list = self.class.refresh_list
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable

Instance Attribute Details

the ActionLink for this action



27
28
29
# File 'lib/active_scaffold/config/delete.rb', line 27

def link
  @link
end

#refresh_listObject

whether we should refresh list after destroy or not



30
31
32
# File 'lib/active_scaffold/config/delete.rb', line 30

def refresh_list
  @refresh_list
end