Class: Openseadragon::Install

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

Instance Method Summary collapse

Instance Method Details

#assetsObject



7
8
9
10
11
12
13
14
# File 'lib/generators/openseadragon/install_generator.rb', line 7

def assets
  copy_file "openseadragon.css", "app/assets/stylesheets/openseadragon.css"
  copy_file "openseadragon.js", "app/assets/javascripts/openseadragon.js"

  if File.exist? 'app/assets/config/manifest.js'
    append_to_file 'app/assets/config/manifest.js', "\n//= link openseadragon-assets\n"
  end
end

#inject_helperObject



16
17
18
19
20
# File 'lib/generators/openseadragon/install_generator.rb', line 16

def inject_helper
  inject_into_class 'app/controllers/application_controller.rb', ApplicationController do
    "  helper Openseadragon::OpenseadragonHelper\n"
  end
end