d17134cb5c
Yes, Platform Agent is overkill for just this but there isn't a one-size JS solution for updating both input placeholders and other HTML text and we're likely to need it later for other things like displaying platform-specific PWA prompts.
13 lines
204 B
Ruby
13 lines
204 B
Ruby
module SetPlatform
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
helper_method :platform
|
|
end
|
|
|
|
private
|
|
def platform
|
|
@platform ||= ApplicationPlatform.new(request.user_agent)
|
|
end
|
|
end
|