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
- @@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.
-
#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) @core = core_config self.method = self.class.method self.link = self.class.link.clone self.action_after_clone = self.class.action_after_clone self.refresh_list = self.class.refresh_list end |
Instance Attribute Details
#action_after_clone ⇒ Object
which action render after clone with post
39 40 41 |
# File 'lib/active_scaffold/config/duplicate.rb', line 39 def action_after_clone @action_after_clone end |
#link ⇒ Object
the ActionLink for this action
33 34 35 |
# File 'lib/active_scaffold/config/duplicate.rb', line 33 def link @link end |
#method ⇒ Object
the method to clone records
36 37 38 |
# File 'lib/active_scaffold/config/duplicate.rb', line 36 def method @method end |
#refresh_list ⇒ Object
whether we should refresh list after clone or not
42 43 44 |
# File 'lib/active_scaffold/config/duplicate.rb', line 42 def refresh_list @refresh_list end |