Skip to content

Commit

Permalink
allow custom_context even without request
Browse files Browse the repository at this point in the history
  • Loading branch information
eacaps committed Jul 21, 2016
1 parent 1e9d58c commit 610906e
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions app/helpers/react_on_rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,10 @@ def rails_context(server_side:)
i18nDefaultLocale: I18n.default_locale,
httpAcceptLanguage: request.env["HTTP_ACCEPT_LANGUAGE"]
}

if ReactOnRails.configuration.rendering_extension
custom_context = ReactOnRails.configuration.rendering_extension.custom_context(self)
result.merge!(custom_context) if custom_context
end
end
if ReactOnRails.configuration.rendering_extension
custom_context = ReactOnRails.configuration.rendering_extension.custom_context(self)
result.merge!(custom_context) if custom_context
end
result
end
Expand Down

0 comments on commit 610906e

Please sign in to comment.