Class: ScaffoldingSandbox
- Includes:
- ActionView::Helpers::ActiveRecordHelper
- Defined in:
- lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
Instance Attribute Summary collapse
-
#form_action ⇒ Object
Returns the value of attribute form_action.
-
#model_instance ⇒ Object
Returns the value of attribute model_instance.
-
#singular_name ⇒ Object
Returns the value of attribute singular_name.
-
#suffix ⇒ Object
Returns the value of attribute suffix.
Instance Method Summary collapse
Instance Attribute Details
#form_action ⇒ Object
Returns the value of attribute form_action.
4 5 6 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 4 def form_action @form_action end |
#model_instance ⇒ Object
Returns the value of attribute model_instance.
4 5 6 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 4 def model_instance @model_instance end |
#singular_name ⇒ Object
Returns the value of attribute singular_name.
4 5 6 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 4 def singular_name @singular_name end |
#suffix ⇒ Object
Returns the value of attribute suffix.
4 5 6 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 4 def suffix @suffix end |
Instance Method Details
#default_input_block ⇒ Object
10 11 12 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 10 def default_input_block Proc.new { |record, column| "<p><label for=\"#{record}_#{column.name}\">#{column.human_name}</label><br/>\n<%= check_update(@#{record},\"#{column.name}\",(#{input(record, column.name)}), @#{record}.#{column.name} )%>\n</p>"} end |
#sandbox_binding ⇒ Object
6 7 8 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 6 def sandbox_binding binding end |