Skip to content

Business intelligence made simple

renames before_filter to before_action to follow rails conventions

Mark Rebec246e009f55a1
diff --git a/app/controllers/blazer/base_controller.rb b/app/controllers/blazer/base_controller.rb
index 7bb1f4b4..335617c8 100644
--- a/app/controllers/blazer/base_controller.rb
+++ b/app/controllers/blazer/base_controller.rb
@@ -9,8 +9,8 @@ module Blazer
http_basic_authenticate_with name: ENV["BLAZER_USERNAME"], password: ENV["BLAZER_PASSWORD"]
end
- if Blazer.before_filter
- before_action Blazer.before_filter
+ if Blazer.before_action
+ before_action Blazer.before_action
end
layout "blazer/application"
diff --git a/lib/blazer.rb b/lib/blazer.rb
index cba44562..0ad5d61f 100644
--- a/lib/blazer.rb
+++ b/lib/blazer.rb
@@ -13,7 +13,7 @@ module Blazer
attr_accessor :user_name
attr_accessor :user_class
attr_accessor :user_method
- attr_accessor :before_filter
+ attr_accessor :before_action
attr_accessor :from_email
attr_accessor :cache
attr_accessor :transform_statement
diff --git a/lib/blazer/engine.rb b/lib/blazer/engine.rb
index 90cbd16f..a94672a4 100644
--- a/lib/blazer/engine.rb
+++ b/lib/blazer/engine.rb
@@ -11,7 +11,7 @@ module Blazer
Blazer.audit = Blazer.settings.key?("audit") ? Blazer.settings["audit"] : true
Blazer.user_name = Blazer.settings["user_name"] if Blazer.settings["user_name"]
Blazer.from_email = Blazer.settings["from_email"] if Blazer.settings["from_email"]
- Blazer.before_filter = Blazer.settings["before_filter"] if Blazer.settings["before_filter"]
+ Blazer.before_action = Blazer.settings["before_action"] if Blazer.settings["before_action"]
Blazer.user_class ||= Blazer.settings.key?("user_class") ? Blazer.settings["user_class"] : (User rescue nil)
Blazer.user_method = Blazer.settings["user_method"]
diff --git a/lib/generators/blazer/templates/config.yml b/lib/generators/blazer/templates/config.yml
index 98a71639..1b173353 100644
--- a/lib/generators/blazer/templates/config.yml
+++ b/lib/generators/blazer/templates/config.yml
@@ -41,7 +41,7 @@ audit: true
# user_name: name
# optional auth method to use as a before_action (default: nil)
-# before_filter: :authenticate!
+# before_action: :authenticate!
# email to send checks from
# from_email: [email protected]