Class: Formtastic::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/formtastic/install/install_generator.rb

Overview

TODO:

Revisit in Rails 3.1 where public assets are treated differently

Copies formtastic.css and formtastic_changes.css to public/stylesheets/ and a config initializer to config/initializers/formtastic_config.rb.

Examples:

$ rails generate formtastic:install

Instance Method Summary collapse

Instance Method Details

#copy_filesObject



16
17
18
19
20
21
# File 'lib/generators/formtastic/install/install_generator.rb', line 16

def copy_files
  template        'formtastic.rb', 'config/initializers/formtastic.rb'

  template        'formtastic.css',         'public/stylesheets/formtastic.css'
  template        'formtastic_changes.css', 'public/stylesheets/formtastic_changes.css'
end