Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds code comment and reverts a rubocop change that breaks theming #1950

Merged
merged 1 commit into from
Jun 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/controllers/concerns/hyrax/works_controller_behavior.rb
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,9 @@ def inject_show_theme_views
show_theme_view_path = Rails.root.join('app', 'views', "themes", show_page_theme.to_s)
prepend_view_path(show_theme_view_path)
yield
view_paths = original_paths # rubocop:disable Lint/UselessAssignment
# rubocop:disable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
# Do NOT change this line. This is calling the Rails view_paths=(paths) method and not a variable assignment.
view_paths=(original_paths)
# rubocop:enable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
else
yield
Expand Down
1 change: 1 addition & 0 deletions app/controllers/hyrax/contact_form_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def inject_theme_views
prepend_view_path(home_theme_view_path)
yield
# rubocop:disable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
# Do NOT change this line. This is calling the Rails view_paths=(paths) method and not a variable assignment.
view_paths=(original_paths)
# rubocop:enable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
else
Expand Down
1 change: 1 addition & 0 deletions app/controllers/hyrax/homepage_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def inject_theme_views
prepend_view_path(home_theme_view_path)
yield
# rubocop:disable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
# Do NOT change this line. This is calling the Rails view_paths=(paths) method and not a variable assignment.
view_paths=(original_paths)
# rubocop:enable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
else
Expand Down
1 change: 1 addition & 0 deletions app/controllers/hyrax/pages_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def inject_theme_views
prepend_view_path(home_theme_view_path)
yield
# rubocop:disable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
# Do NOT change this method. This is an override of the view_paths= method and not a variable assignment.
view_paths=(original_paths)
# rubocop:enable Lint/UselessAssignment, Layout/SpaceAroundOperators, Style/RedundantParentheses
else
Expand Down