Class: Sufia::Upgrade700Generator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Sufia::Upgrade700Generator
- Defined in:
- lib/generators/sufia/upgrade700_generator.rb
Instance Method Summary collapse
- #banner ⇒ Object
- #qa_routes ⇒ Object
- #qa_tables ⇒ Object
-
#update_catalog_controller ⇒ Object
The engine routes have to come after the devise routes so that /users/sign_in will work.
Instance Method Details
#banner ⇒ Object
12 13 14 |
# File 'lib/generators/sufia/upgrade700_generator.rb', line 12 def say_status("info", "APPLYING SUFIA 7.0 CHANGES", :blue) end |
#qa_routes ⇒ Object
22 23 24 25 26 |
# File 'lib/generators/sufia/upgrade700_generator.rb', line 22 def qa_routes insert_into_file "config/routes.rb", after: ".draw do" do "\n mount Qa::Engine => '/authorities'\n" end end |
#qa_tables ⇒ Object
28 29 30 |
# File 'lib/generators/sufia/upgrade700_generator.rb', line 28 def qa_tables generate 'qa:local:tables' end |
#update_catalog_controller ⇒ Object
The engine routes have to come after the devise routes so that /users/sign_in will work
17 18 19 20 |
# File 'lib/generators/sufia/upgrade700_generator.rb', line 17 def update_catalog_controller # Nuke old search_params_logic gsub_file 'app/controllers/catalog_controller.rb', '[:add_access_controls_to_solr_params, :add_advanced_parse_q_to_solr]', '[:add_advanced_parse_q_to_solr] + search_params_logic + [:add_access_controls_to_solr_params]' end |