Class: Formtastic::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Formtastic::InstallGenerator
- Defined in:
- lib/generators/formtastic/install/install_generator.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.banner ⇒ Object
11 12 13 |
# File 'lib/generators/formtastic/install/install_generator.rb', line 11 def self. "rails generate formtastic:install [options]" end |
.source_root ⇒ Object
6 7 8 9 |
# File 'lib/generators/formtastic/install/install_generator.rb', line 6 def self.source_root # Set source directory for the templates to the rails2 generator template directory @source_root ||= File.(File.join('..', '..', '..', '..', 'generators', 'formtastic', 'templates'), File.dirname(__FILE__)) end |
Instance Method Details
#copy_files ⇒ Object
15 16 17 18 19 20 21 22 |
# File 'lib/generators/formtastic/install/install_generator.rb', line 15 def copy_files empty_directory 'config/initializers' template 'formtastic.rb', 'config/initializers/formtastic.rb' empty_directory 'public/stylesheets' template 'formtastic.css', 'public/stylesheets/formtastic.css' template 'formtastic_changes.css', 'public/stylesheets/formtastic_changes.css' end |