Class: Administrate::Generators::FieldGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/administrate/field/field_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_partialsObject



13
14
15
16
17
# File 'lib/generators/administrate/field/field_generator.rb', line 13

def copy_partials
  copy_partial(:show)
  copy_partial(:index)
  copy_partial(:form)
end

#template_field_objectObject



6
7
8
9
10
11
# File 'lib/generators/administrate/field/field_generator.rb', line 6

def template_field_object
  template(
    "field_object.rb.erb",
    "app/fields/#{file_name}_field.rb",
  )
end