Class: FromHyrax::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- FromHyrax::InstallGenerator
- Defined in:
- lib/generators/install/install_generator.rb
Instance Method Summary collapse
Instance Method Details
#inject_content_dm_yml ⇒ Object
4 5 6 |
# File 'lib/generators/install/install_generator.rb', line 4 def inject_content_dm_yml copy_file('config/from_hyrax.yml', 'config/from_hyrax.yml') unless File.file?('config/from_hyrax.yml') end |
#inject_dashboard_link ⇒ Object
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/generators/install/install_generator.rb', line 8 def inject_dashboard_link file_path = 'app/views/spotlight/shared/_curation_sidebar.html.erb' if File.file?(file_path) insert_into_file file_path, before: /[ \t]*<% if can\? :tag, current_exhibit %>/m do " \n<%= nav_link t(:'Hyrax Transfer'), main_app.from_hyrax_index_path(current_exhibit) %>\n" end else copy_file 'views/_curation_sidebar.html.erb', file_path end end |