lib/action_controller.rb in actionpack-2.1.2 vs lib/action_controller.rb in actionpack-2.2.2

- old
+ new

@@ -19,20 +19,17 @@ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -$:.unshift(File.dirname(__FILE__)) unless - $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__))) - -unless defined?(ActiveSupport) - begin - $:.unshift "#{File.dirname(__FILE__)}/../../activesupport/lib" +begin + require 'active_support' +rescue LoadError + activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" + if File.directory?(activesupport_path) + $:.unshift activesupport_path require 'active_support' - rescue LoadError - require 'rubygems' - gem 'activesupport' end end $:.unshift "#{File.dirname(__FILE__)}/action_controller/vendor/html-scanner" @@ -51,13 +48,15 @@ require 'action_controller/verification' require 'action_controller/streaming' require 'action_controller/session_management' require 'action_controller/http_authentication' require 'action_controller/components' +require 'action_controller/rack_process' require 'action_controller/record_identifier' require 'action_controller/request_forgery_protection' require 'action_controller/headers' +require 'action_controller/translation' require 'action_view' ActionController::Base.class_eval do include ActionController::Flash @@ -74,6 +73,7 @@ include ActionController::SessionManagement include ActionController::HttpAuthentication::Basic::ControllerMethods include ActionController::Components include ActionController::RecordIdentifier include ActionController::RequestForgeryProtection + include ActionController::Translation end