mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
fix: Broken /terms and /privacy routes (#749)
* fix: replace invalid redirect("about:blank") with proper controller actions
The privacy and terms routes were using redirect("about:blank") which is
invalid because about:blank is a browser-specific pseudo URL, not a valid
HTTP redirect target. This fix replaces them with proper controller actions
that render placeholder pages.
Changes:
- Add privacy and terms actions to PagesController with skip_authentication
- Create privacy.html.erb and terms.html.erb view templates
- Add i18n translations for the new pages
- Update routes to use pages#privacy and pages#terms
https://claude.ai/code/session_01RL36dMda1o6LXGsnGnTJZu
* Make legal routes configurable
---------
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class PagesController < ApplicationController
|
||||
include Periodable
|
||||
|
||||
skip_authentication only: :redis_configuration_error
|
||||
skip_authentication only: %i[redis_configuration_error privacy terms]
|
||||
|
||||
def dashboard
|
||||
@balance_sheet = Current.family.balance_sheet
|
||||
@@ -55,6 +55,14 @@ class PagesController < ApplicationController
|
||||
render layout: "blank"
|
||||
end
|
||||
|
||||
def privacy
|
||||
render layout: "blank"
|
||||
end
|
||||
|
||||
def terms
|
||||
render layout: "blank"
|
||||
end
|
||||
|
||||
private
|
||||
def preferences_params
|
||||
prefs = params.require(:preferences)
|
||||
|
||||
Reference in New Issue
Block a user