class BlacklightOembed::Install

Public Instance Methods

assets() click to toggle source
# File lib/generators/blacklight_oembed/install_generator.rb, line 8
def assets
  copy_file "blacklight_oembed.css.scss", "app/assets/stylesheets/blacklight_oembed.css.scss"
  copy_file "blacklight_oembed.js", "app/assets/javascripts/blacklight_oembed.js"
end
configuration() click to toggle source
# File lib/generators/blacklight_oembed/install_generator.rb, line 21
    def configuration
      inject_into_file 'app/controllers/catalog_controller.rb', after: "configure_blacklight do |config|" do
        <<-EOF

          config.show.oembed_field = :oembed_url_ssm
          config.show.partials.insert(1, :oembed)
        EOF
      end
    end
inject_oembed_configuration() click to toggle source
# File lib/generators/blacklight_oembed/install_generator.rb, line 17
def inject_oembed_configuration
  copy_file "oembed_providers.rb", "config/initializers/oembed_providers.rb"
end
inject_routes() click to toggle source
# File lib/generators/blacklight_oembed/install_generator.rb, line 13
def inject_routes
  route "mount Blacklight::Oembed::Engine, at: 'oembed'"
end