class Revelry::Generators::Content::InstallGenerator
Public Instance Methods
add_controller_concern()
click to toggle source
# File lib/generators/revelry/content/install_generator.rb, line 26 def add_controller_concern insert_into_file app_controller, after: "ApplicationController < ActionController::Base\n" do "include Revelry::Content::WithRevelryContent\n" end end
add_css_assets()
click to toggle source
# File lib/generators/revelry/content/install_generator.rb, line 14 def add_css_assets generate 'revelry:content:css' end
add_initializer()
click to toggle source
# File lib/generators/revelry/content/install_generator.rb, line 18 def add_initializer generate 'revelry:content:initializer' end
add_js_assets()
click to toggle source
# File lib/generators/revelry/content/install_generator.rb, line 10 def add_js_assets generate 'revelry:content:js' end
add_migrations()
click to toggle source
# File lib/generators/revelry/content/install_generator.rb, line 5 def add_migrations generate 'revelry:content:migrations' rake 'db:migrate' end
add_route()
click to toggle source
# File lib/generators/revelry/content/install_generator.rb, line 22 def add_route route 'mount Revelry::Content::Engine => "/revelry_content"' end
Private Instance Methods
app_controller()
click to toggle source
# File lib/generators/revelry/content/install_generator.rb, line 34 def app_controller File.join('app', 'controllers', 'application_controller.rb') end