mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-02-21 20:20:34 +09:00
14 lines
261 B
Ruby
14 lines
261 B
Ruby
module SetCurrentRequest
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
before_action do
|
|
Current.request = request
|
|
end
|
|
end
|
|
|
|
def default_url_options
|
|
{ host: Current.request_host, protocol: Current.request_protocol }.compact_blank
|
|
end
|
|
end
|