lib/generators/blacklight_range_limit/install_generator.rb
# Adds range limit behavior to search history controller
Adds range limit behavior to search history controller
Adds range limit behavior to search history controller
def install_search_history_controller
      path = 'app/controllers/search_history_controller.rb'
      if File.exist? path
        inject_into_file path, after: /include Blacklight::SearchHistory.*$/ do
          "\n  helper BlacklightRangeLimit::ViewHelperOverride"\
          "\n  helper RangeLimitHelper"
        end
      else
        copy_file 'search_history_controller.rb', path
      end
    end
def install_search_history_controller path = 'app/controllers/search_history_controller.rb' if File . exist? path inject_into_file path , after : / include Blacklight::SearchHistory.*$ / do "\n  helper BlacklightRangeLimit::ViewHelperOverride" "\n  helper RangeLimitHelper" end else copy_file 'search_history_controller.rb' , path end end
Adds range limit behavior to search history controller
Adds range limit behavior to search history controller
# If local copy of search history controller exists, add range limit helpers # Otherwise copies search history controller to application