class Interview::Generators::ViewControlGenerator
Public Instance Methods
add_erb_templates()
click to toggle source
# File lib/generators/interview/view_control/view_control_generator.rb, line 13 def add_erb_templates template "list.rb", "app/view_controls/#{file_name}_list.rb" template "card.rb", "app/view_controls/#{file_name}_card.rb" template "form.rb", "app/view_controls/#{file_name}_form.rb" end
Protected Instance Methods
attribute_class_name(attribute)
click to toggle source
# File lib/generators/interview/view_control/view_control_generator.rb, line 21 def attribute_class_name(attribute) return case attribute.type when :string then 'StringAttribute' when :text then 'TextAttribute' when :boolean then 'BooleanAttribute' when :date then 'DateAttribute' when :option then 'OptionAttribute' else 'Attribute' end end