1
0

instance_helper.rb 557 B

1234567891011121314151617181920212223
  1. # frozen_string_literal: true
  2. module InstanceHelper
  3. def site_title
  4. Setting.site_title
  5. end
  6. def site_hostname
  7. @site_hostname ||= Addressable::URI.parse("//#{Rails.configuration.x.local_domain}").display_uri.host
  8. end
  9. def description_for_sign_up
  10. prefix = begin
  11. if @invite.present?
  12. I18n.t('auth.description.prefix_invited_by_user', name: @invite.user.account.username)
  13. else
  14. I18n.t('auth.description.prefix_sign_up')
  15. end
  16. end
  17. safe_join([prefix, I18n.t('auth.description.suffix')], ' ')
  18. end
  19. end