Class: ScaffoldingSandbox

Inherits:
Object show all
Includes:
ActionView::Helpers::ActiveRecordHelper
Defined in:
lib/rails_generator/generators/components/scaffold/scaffold_generator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#form_actionObject

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_instanceObject

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_nameObject

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

#suffixObject

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_blockObject



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#{input(record, column.name)}</p>\n" }
end

#sandbox_bindingObject



6
7
8
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 6

def sandbox_binding
  binding
end