Class: ActionView::Helpers::InstanceTag
- Defined in:
- lib/rails_generator/generators/components/scaffold/scaffold_generator.rb
Instance Method Summary collapse
- #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
Instance Method Details
#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? ? '' : ', '+ .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? ? '' : ', '+ .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? ? '' : ', '+.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? ? '' : ', '+ .inspect} %>" end |