Class: ActiveScaffold::Config::Create
- Defined in:
- lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb
Constant Summary collapse
- @@link =
ActiveScaffold::DataStructures::ActionLink.new('new', :label => :create_new, :type => :table, :security_method => :create_authorized?)
- @@persistent =
false
- @@edit_after_create =
false
Instance Attribute Summary collapse
-
#edit_after_create ⇒ Object
whether the form stays open after a create or not.
-
#persistent ⇒ Object
whether the form stays open after a create or not.
Attributes inherited from Form
Attributes inherited from Base
Class Method Summary collapse
-
.link ⇒ Object
global level configuration ————————– the ActionLink for this action.
- .link=(val) ⇒ Object
Instance Method Summary collapse
-
#initialize(*args) ⇒ Create
constructor
A new instance of Create.
-
#label(model = nil) ⇒ Object
instance-level configuration —————————- the label= method already exists in the Form base class.
Methods inherited from Form
#columns, #columns=, #multipart?
Methods inherited from Base
#crud_type, #formats, #formats=, inherited
Methods included from ActiveScaffold::Configurable
Constructor Details
#initialize(*args) ⇒ Create
Returns a new instance of Create.
4 5 6 7 8 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb', line 4 def initialize(*args) super self.persistent = self.class.persistent self.edit_after_create = self.class.edit_after_create end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#edit_after_create ⇒ Object
whether the form stays open after a create or not
41 42 43 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb', line 41 def edit_after_create @edit_after_create end |
#persistent ⇒ Object
whether the form stays open after a create or not
38 39 40 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb', line 38 def persistent @persistent end |
Class Method Details
.link ⇒ Object
global level configuration
the ActionLink for this action
13 14 15 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb', line 13 def self.link @@link end |
.link=(val) ⇒ Object
16 17 18 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb', line 16 def self.link=(val) @@link = val end |
Instance Method Details
#label(model = nil) ⇒ Object
instance-level configuration
the label= method already exists in the Form base class
32 33 34 35 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/active_scaffold/config/create.rb', line 32 def label(model = nil) model ||= @core.label(:count => 1) @label ? as_(@label) : as_(:create_model, :model => model) end |