Sha256: 910566f39a6c595b50c4feb388942d06bc341a7981384ccc608913deacef7d1c
Contents?: true
Size: 1.4 KB
Versions: 41
Compression:
Stored size: 1.4 KB
Contents
# Copy BlacklightRangeLimit assets to public folder in current app. # If you want to do this on application startup, you can # add this next line to your one of your environment files -- # generally you'd only want to do this in 'development', and can # add it to environments/development.rb: # require File.join(BlacklightRangeLimit.root, "lib", "generators", "blacklight", "assets_generator.rb") # BlacklightRangeLimit::AssetsGenerator.start(["--force", "--quiet"]) # Need the requires here so we can call the generator from environment.rb # as suggested above. require 'rails/generators' require 'rails/generators/base' module BlacklightRangeLimit class AssetsGenerator < Rails::Generators::Base source_root File.join(BlacklightRangeLimit::Engine.root, 'app', 'assets') def assets application_css = Dir["app/assets/stylesheets/application{.css,.scss,.css.scss}"].first if application_css insert_into_file application_css, :before => "*/" do %q{ * * Used by blacklight_range_limit *= require 'blacklight_range_limit' * } end else say_status "warning", "Can not find application.css, did not insert our require", :red end append_to_file "app/assets/javascripts/application.js" do %q{ // For blacklight_range_limit built-in JS, if you don't want it you don't need // this: //= require 'blacklight_range_limit' } end end end end
Version data entries
41 entries across 41 versions & 1 rubygems