Class: ActiveScaffold::Config::Create
- Defined in:
- lib/active_scaffold/config/create.rb
Constant Summary collapse
- @@link =
ActiveScaffold::DataStructures::ActionLink.new('new', label: :create_new, type: :collection, security_method: :create_authorized?, ignore_method: :create_ignore?)
- @@action_after_create =
nil
Constants inherited from Base
Instance Attribute Summary collapse
-
#action_after_create ⇒ Object
whether the form stays open after a create or not.
Attributes inherited from Form
#field_descriptions, #floating_footer, #label, #link, #multipart, #persistent, #refresh_list, #show_unauthorized_columns
Attributes inherited from Base
#action_group, #core, #formats, #user_settings_key
Class Method Summary collapse
-
.link ⇒ Object
global level configuration ————————– the ActionLink for this action.
- .link=(val) ⇒ Object
Instance Method Summary collapse
-
#initialize(core_config) ⇒ Create
constructor
A new instance of Create.
Methods inherited from Form
Methods inherited from Base
inherited, #label, #model_id, #new_user_settings, #setup_user_setting_key, #user
Methods included from ActiveScaffold::Configurable
#configure, #method_missing, #respond_to_missing?
Constructor Details
#initialize(core_config) ⇒ Create
Returns a new instance of Create.
6 7 8 9 10 |
# File 'lib/active_scaffold/config/create.rb', line 6 def initialize(core_config) super @label = :create_model self.action_after_create = self.class.action_after_create end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#action_after_create ⇒ Object
whether the form stays open after a create or not
32 33 34 |
# File 'lib/active_scaffold/config/create.rb', line 32 def action_after_create @action_after_create end |
Class Method Details
.link ⇒ Object
global level configuration
the ActionLink for this action
15 16 17 |
# File 'lib/active_scaffold/config/create.rb', line 15 def self.link @@link end |
.link=(val) ⇒ Object
19 20 21 |
# File 'lib/active_scaffold/config/create.rb', line 19 def self.link=(val) @@link = val end |