Class: ActionView::Helpers::InstanceTag
- Defined in:
- lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
Instance Method Summary collapse
- #to_boolean_select_tag(options = {}) ⇒ Object
- #to_date_select_tag(options = {}) ⇒ Object
- #to_datetime_select_tag(options = {}) ⇒ Object
- #to_input_field_tag(field_type, options = {}) ⇒ Object
- #to_text_area_tag(options = {}) ⇒ Object
- #to_time_select_tag(options = {}) ⇒ Object
Instance Method Details
#to_boolean_select_tag(options = {}) ⇒ Object
38 39 40 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 38 def to_boolean_select_tag(= {}) " check_box '#{@object_name}', '#{@method_name}' #{.empty? ? '' : ', '+ .inspect} " end |
#to_date_select_tag(options = {}) ⇒ Object
26 27 28 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 26 def to_date_select_tag( = {}) " date_select '#{@object_name}', '#{@method_name}', #{.empty? ? 'options = {}' : ', '+ .inspect} " end |
#to_datetime_select_tag(options = {}) ⇒ Object
30 31 32 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 30 def to_datetime_select_tag( = {}) " datetime_select '#{@object_name}', '#{@method_name}', #{.empty? ? 'options = {}' : ', '+ .inspect} " end |
#to_input_field_tag(field_type, options = {}) ⇒ Object
17 18 19 20 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 17 def to_input_field_tag(field_type, ={}) field_meth = "#{field_type}_field" " #{field_meth} '#{@object_name}', '#{@method_name}', #{.empty? ? 'options = {}' : ', '+.inspect} " end |
#to_text_area_tag(options = {}) ⇒ Object
22 23 24 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 22 def to_text_area_tag( = {}) " text_area '#{@object_name}', '#{@method_name}', #{.empty? ? 'options = {}' : ', '+ .inspect} " end |
#to_time_select_tag(options = {}) ⇒ Object
34 35 36 |
# File 'lib/rails_generator/generators/components/scaffold/scaffold_generator.rb', line 34 def to_time_select_tag( = {}) " time_select '#{@object_name}', '#{@method_name}', #{.empty? ? 'options = {}' : ', '+ .inspect} " end |