Class: Imageomatic::InstallGenerator

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

Instance Method Summary collapse

Instance Method Details

#copy_configuration_fileObject



16
17
18
# File 'lib/generators/imageomatic/install/install_generator.rb', line 16

def copy_configuration_file
  template "imageomatic.rb.tt", "config/initializers/imageomatic.rb"
end

#copy_layoutObject



12
13
14
# File 'lib/generators/imageomatic/install/install_generator.rb', line 12

def copy_layout
  copy_file "application.opengraph.erb", "app/views/layouts/application.opengraph.erb"
end

#include_controller_helperObject



4
5
6
7
8
9
10
# File 'lib/generators/imageomatic/install/install_generator.rb', line 4

def include_controller_helper
  inject_into_file 'app/controllers/application_controller.rb', after: "class ApplicationController < ActionController::Base\n" do <<-'RUBY'
include Imageomatic::Opengraph

  RUBY
  end
end