Merge remote-tracking branch 'parent/main' into kb_development
This commit is contained in:
commit
3c649aa74d
56 changed files with 949 additions and 922 deletions
11
app/helpers/invites_helper.rb
Normal file
11
app/helpers/invites_helper.rb
Normal file
|
@ -0,0 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module InvitesHelper
|
||||
def invites_max_uses_options
|
||||
[1, 5, 10, 25, 50, 100]
|
||||
end
|
||||
|
||||
def invites_expires_options
|
||||
[30.minutes, 1.hour, 6.hours, 12.hours, 1.day, 1.week]
|
||||
end
|
||||
end
|
|
@ -254,6 +254,7 @@ module LanguagesHelper
|
|||
|
||||
def valid_locale_or_nil(str)
|
||||
return if str.blank?
|
||||
return str if valid_locale?(str)
|
||||
|
||||
code, = str.to_s.split(/[_-]/) # Strip out the region from e.g. en_US or ja-JP
|
||||
|
||||
|
|
|
@ -5,8 +5,6 @@ module MascotHelper
|
|||
full_asset_url(instance_presenter.mascot&.file&.url || asset_pack_path('media/images/elephant_ui_plane.svg'))
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def instance_presenter
|
||||
@instance_presenter ||= InstancePresenter.new
|
||||
end
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
module RoutingHelper
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
include Rails.application.routes.url_helpers
|
||||
include ActionView::Helpers::AssetTagHelper
|
||||
include Webpacker::Helper
|
||||
|
||||
included do
|
||||
include Rails.application.routes.url_helpers
|
||||
|
||||
def default_url_options
|
||||
ActionMailer::Base.default_url_options
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue