test/fake_app/rails_app.rb in rambulance-1.0.3 vs test/fake_app/rails_app.rb in rambulance-1.1.0
- old
+ new
@@ -6,10 +6,11 @@
config.session_store :cookie_store, :key => '_myapp_session'
config.active_support.deprecation = :log
config.eager_load = false
config.root = File.dirname(__FILE__)
config.autoload_paths += ["#{config.root}/lib"] if ENV["CUSTOM_EXCEPTIONS_APP"]
+ config.hosts = "www.example.com"
if Rails::VERSION::STRING >= "5.2"
config.action_controller.default_protect_from_forgery = true
end
end
@@ -48,10 +49,11 @@
def bad_filter
raise "This is a bad filter."
end
end
+
class UsersController < ApplicationController
if self.respond_to? :skip_before_action
skip_before_action :bad_filter, except: :show
else
skip_filter :bad_filter, except: :show
@@ -77,9 +79,10 @@
def edit
raise ForbiddenException
end
end
+
class ProjectsController < ApplicationController
if self.respond_to?(:skip_forgery_protection)
skip_forgery_protection
end