Sha256: 53f72f81e8ca0e52a69fd946f71fdf1a831db178c67b7aac765de6fd8992e608
Contents?: true
Size: 631 Bytes
Versions: 3
Compression:
Stored size: 631 Bytes
Contents
class MockApplication def self.env_config {} end def self.routes @routes ||= ActionDispatch::Routing::RouteSet.new end end MockApplication.routes.draw do resource :callback_tests end ::Rails.application = MockApplication ActionController::Base.send :include, RailsLocaleDetection::ControllerMethods ActionController::Base.send :include, Rails.application.routes.url_helpers class CallbackTestsController < ActionController::Base def user_locale :fr end def show if ::Rails.version.to_s < "4.1" render text: current_locale else render plain: current_locale end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rails_locale_detection-2.3.0 | spec/support/rails.rb |
rails_locale_detection-2.2.0 | spec/support/rails.rb |
rails_locale_detection-2.1.0 | spec/support/rails.rb |