Class: Blocky::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Blocky::InstallGenerator
- Defined in:
- lib/generators/blocky/install_generator.rb
Instance Method Summary collapse
-
#install_blocky_content_helper ⇒ Object
Install the content block helper into the main app’s ApplicationHelper.
-
#install_migrations ⇒ Object
Install the database migrations required for Blocky’s content blocks.
Instance Method Details
#install_blocky_content_helper ⇒ Object
Install the content block helper into the main app’s ApplicationHelper.
11 12 13 14 15 |
# File 'lib/generators/blocky/install_generator.rb', line 11 def install_blocky_content_helper insert_into_file(File.join("app", "helpers", "application_helper.rb"), after: "module ApplicationHelper\n") do " include BlockyHelper\n" end end |
#install_migrations ⇒ Object
Install the database migrations required for Blocky’s content blocks
6 7 8 |
# File 'lib/generators/blocky/install_generator.rb', line 6 def install_migrations rake "blocky:install:migrations" end |