Class: ActiveScaffold::Config::Form
- Defined in:
- lib/active_scaffold/config/form.rb
Constant Summary collapse
- @@persistent =
false- @@refresh_list =
falsefalse- @@field_descriptions =
:show
Constants inherited from Base
Instance Attribute Summary collapse
-
#field_descriptions ⇒ Object
whether field descriptions are visible always, on hover or click (:show, :hover, :click, default to :show).
-
#floating_footer ⇒ Object
whether footer should float when form is too long to fit in the screen, so footer is always available while scrolling.
-
#label ⇒ Object
writeonly
the label for this Form action.
-
#link ⇒ Object
the ActionLink for this action.
-
#multipart ⇒ Object
writeonly
whether the form should be multipart.
-
#persistent ⇒ Object
whether the form stays open after a create or not.
-
#refresh_list ⇒ Object
whether we should refresh list after create or not.
-
#show_unauthorized_columns ⇒ Object
show value of unauthorized columns instead of skip them.
Attributes inherited from Base
#action_group, #core, #formats, #user_settings_key
Instance Method Summary collapse
-
#initialize(core_config) ⇒ Form
constructor
A new instance of Form.
- #multipart? ⇒ Boolean
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) ⇒ Form
Returns a new instance of Form.
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/active_scaffold/config/form.rb', line 5 def initialize(core_config) super = self.class. @refresh_list = self.class.refresh_list @persistent = self.class.persistent = self.class. @field_descriptions = self.class.field_descriptions # no global setting here because multipart should only be set for specific forms @multipart = false end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class ActiveScaffold::Configurable
Instance Attribute Details
#field_descriptions ⇒ Object
whether field descriptions are visible always, on hover or click (:show, :hover, :click, default to :show)
60 61 62 |
# File 'lib/active_scaffold/config/form.rb', line 60 def field_descriptions @field_descriptions end |
#floating_footer ⇒ Object
whether footer should float when form is too long to fit in the screen, so footer is always available while scrolling
57 58 59 |
# File 'lib/active_scaffold/config/form.rb', line 57 def end |
#label=(value) ⇒ Object (writeonly)
the label for this Form action. used for the header.
48 49 50 |
# File 'lib/active_scaffold/config/form.rb', line 48 def label=(value) @label = value end |
#link ⇒ Object
the ActionLink for this action
45 46 47 |
# File 'lib/active_scaffold/config/form.rb', line 45 def link @link end |
#multipart=(value) ⇒ Object (writeonly)
whether the form should be multipart
68 69 70 |
# File 'lib/active_scaffold/config/form.rb', line 68 def multipart=(value) @multipart = value end |
#persistent ⇒ Object
whether the form stays open after a create or not
51 52 53 |
# File 'lib/active_scaffold/config/form.rb', line 51 def persistent @persistent end |
#refresh_list ⇒ Object
whether we should refresh list after create or not
54 55 56 |
# File 'lib/active_scaffold/config/form.rb', line 54 def refresh_list @refresh_list end |
#show_unauthorized_columns ⇒ Object
show value of unauthorized columns instead of skip them
42 43 44 |
# File 'lib/active_scaffold/config/form.rb', line 42 def end |
Instance Method Details
#multipart? ⇒ Boolean
70 71 72 |
# File 'lib/active_scaffold/config/form.rb', line 70 def multipart? @multipart ? true : false end |