Class: Formtastic::InputGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/formtastic/input/input_generator.rb

Overview

!!!shell $ rails generate formtastic:input FlexibleText --extend string

Examples:

Extend an existing input behavior

Instance Method Summary collapse

Instance Method Details

#createObject



28
29
30
31
32
# File 'lib/generators/formtastic/input/input_generator.rb', line 28

def create
  normalize_file_name
  define_extension_sentence
  template "input.rb", "app/inputs/#{name.underscore}_input.rb"
end