Class: ActiveScaffold::Config::Duplicate
- Inherits:
-
Base
- Object
- Base
- ActiveScaffold::Config::Duplicate
- Defined in:
- lib/active_scaffold/config/duplicate.rb
Constant Summary collapse
- @@method =
:dup
- @@action_after_clone =
nil
- @@action_view =
:new
- @@refresh_list =
false
- @@link =
ActiveScaffold::DataStructures::ActionLink.new(:duplicate, :type => :member, :method => :post, :position => false, :security_method => :duplicate_authorized?, :ignore_method => :duplicate_ignore?)
Instance Attribute Summary collapse
-
#action_after_clone ⇒ Object
which action render after clone with post.
-
#action_view ⇒ Object
which view render when method is :get (used as respond_to_action argument).
-
#link ⇒ Object
the ActionLink for this action.
-
#method ⇒ Object
the method to clone records.
-
#refresh_list ⇒ Object
whether we should refresh list after clone or not.
Instance Method Summary collapse
-
#initialize(core_config) ⇒ Duplicate
constructor
A new instance of Duplicate.
Constructor Details
#initialize(core_config) ⇒ Duplicate
Returns a new instance of Duplicate.
5 6 7 8 9 10 11 |
# File 'lib/active_scaffold/config/duplicate.rb', line 5 def initialize(core_config) super self.method = self.class.method self.action_after_clone = self.class.action_after_clone self.action_view = self.class.action_view self.refresh_list = self.class.refresh_list end |
Instance Attribute Details
#action_after_clone ⇒ Object
which action render after clone with post
43 44 45 |
# File 'lib/active_scaffold/config/duplicate.rb', line 43 def action_after_clone @action_after_clone end |
#action_view ⇒ Object
which view render when method is :get (used as respond_to_action argument)
46 47 48 |
# File 'lib/active_scaffold/config/duplicate.rb', line 46 def action_view @action_view end |
#link ⇒ Object
the ActionLink for this action
37 38 39 |
# File 'lib/active_scaffold/config/duplicate.rb', line 37 def link @link end |
#method ⇒ Object
the method to clone records
40 41 42 |
# File 'lib/active_scaffold/config/duplicate.rb', line 40 def method @method end |
#refresh_list ⇒ Object
whether we should refresh list after clone or not
49 50 51 |
# File 'lib/active_scaffold/config/duplicate.rb', line 49 def refresh_list @refresh_list end |