Move ActionController::Translation to AbstractController::Translation.
This commit is contained in:
parent
8e2fd54b19
commit
6e26be6960
@ -15,5 +15,6 @@ module AbstractController
|
||||
autoload :LocalizedCache
|
||||
autoload :Logger
|
||||
autoload :Rendering
|
||||
autoload :Translation
|
||||
autoload :UrlFor
|
||||
end
|
||||
|
@ -42,7 +42,7 @@ def view_context
|
||||
# Delegates render_to_body and sticks the result in self.response_body.
|
||||
def render(*args, &block)
|
||||
if response_body
|
||||
raise AbstractController::DoubleRenderError, "Can only render or redirect once per action"
|
||||
raise AbstractController::DoubleRenderError
|
||||
end
|
||||
|
||||
options = _normalize_options(*args, &block)
|
||||
|
2
actionpack/lib/action_controller/translation.rb → actionpack/lib/abstract_controller/translation.rb
2
actionpack/lib/action_controller/translation.rb → actionpack/lib/abstract_controller/translation.rb
@ -1,4 +1,4 @@
|
||||
module ActionController
|
||||
module AbstractController
|
||||
module Translation
|
||||
def translate(*args)
|
||||
I18n.translate(*args)
|
@ -8,7 +8,6 @@ module ActionController
|
||||
autoload :Base
|
||||
autoload :Caching
|
||||
autoload :PolymorphicRoutes
|
||||
autoload :Translation
|
||||
autoload :Metal
|
||||
autoload :Middleware
|
||||
|
||||
|
@ -4,6 +4,7 @@ class Base < Metal
|
||||
|
||||
include AbstractController::Callbacks
|
||||
include AbstractController::Layouts
|
||||
include AbstractController::Translation
|
||||
|
||||
include ActionController::Helpers
|
||||
helper :all # By default, all helpers should be included
|
||||
@ -33,7 +34,6 @@ class Base < Metal
|
||||
include ActionController::Streaming
|
||||
include ActionController::HttpAuthentication::Basic::ControllerMethods
|
||||
include ActionController::HttpAuthentication::Digest::ControllerMethods
|
||||
include ActionController::Translation
|
||||
|
||||
# Add instrumentations hooks at the bottom, to ensure they instrument
|
||||
# all the methods properly.
|
||||
|
Loading…
Reference in New Issue
Block a user