Class: Bootstrap2FormBuilder::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Bootstrap2FormBuilder::Generators::InstallGenerator
- Defined in:
- lib/generators/bootstrap2_form_builder/install_generator.rb
Instance Method Summary collapse
-
#add_my_initializer ⇒ Object
all public methods in here will be run in order.
- #create_error_partials ⇒ Object
Instance Method Details
#add_my_initializer ⇒ Object
all public methods in here will be run in order
10 11 12 |
# File 'lib/generators/bootstrap2_form_builder/install_generator.rb', line 10 def add_my_initializer template "initializer.rb", "config/initializers/bootstrap2_form_builder.rb" end |
#create_error_partials ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/generators/bootstrap2_form_builder/install_generator.rb', line 14 def create_error_partials if [:view_engine] == "haml" || [:haml] copy_file "_error_messages.html.haml", "app/views/bootstrap2_form_builder/_error_messages.html.haml" elsif copy_file "_error_messages.html.erb", "app/views/bootstrap2_form_builder/_error_messages.html.erb" end end |