mirror of
https://github.com/System-End/identity-vault.git
synced 2026-04-19 22:05:07 +00:00
placate brakeman...
This commit is contained in:
parent
df9bb7347a
commit
d0721d3ec6
2 changed files with 4 additions and 3 deletions
|
|
@ -39,8 +39,9 @@ class DocsController < ApplicationController
|
|||
raise ActionController::RoutingError, "Invalid documentation path"
|
||||
end
|
||||
|
||||
erb_path = Rails.root.join("app", "views", "docs", "#{slug}.md.erb")
|
||||
md_path = Rails.root.join("app", "views", "docs", "#{slug}.md")
|
||||
docs_dir = Rails.root.join("app", "views", "docs")
|
||||
erb_path = docs_dir.join("#{slug}.md.erb")
|
||||
md_path = docs_dir.join("#{slug}.md")
|
||||
|
||||
@doc_file_path = File.exist?(erb_path) ? erb_path : md_path
|
||||
end
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
# Strip country code prefix for display (it's shown separately)
|
||||
raw_phone = address.phone_number.presence || current_identity&.phone_number
|
||||
display_phone = if raw_phone.present? && raw_phone.start_with?("+")
|
||||
raw_phone.sub(/^\+#{initial_calling_code}/, "")
|
||||
raw_phone.sub(/^\+#{Regexp.escape(initial_calling_code)}/, "")
|
||||
else
|
||||
raw_phone
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue