whiny-mass-assignment 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new( 'whiny-mass-assignment', '0.2.
|
5
|
+
Echoe.new( 'whiny-mass-assignment', '0.2.2', ) do |p|
|
6
6
|
p.description = "Complain loudly when protected attributes are set through mass assignment."
|
7
7
|
p.url = "https://github.com/appsinyourpants/whiny-mass-assignment"
|
8
8
|
p.author = "Paul Alexander"
|
@@ -5,7 +5,7 @@ module ActiveModel
|
|
5
5
|
|
6
6
|
|
7
7
|
def sanitize_for_mass_assignment_with_warning(attributes)
|
8
|
-
warn_when_mass_assignment_is_not_whitelist unless mass_assignment_authorizer
|
8
|
+
warn_when_mass_assignment_is_not_whitelist unless mass_assignment_authorizer.is_a? WhiteList
|
9
9
|
sanitize_for_mass_assignment_without_warning(attributes)
|
10
10
|
end
|
11
11
|
alias_method_chain :sanitize_for_mass_assignment, :warning
|
@@ -22,7 +22,7 @@ module ActiveModel
|
|
22
22
|
end
|
23
23
|
|
24
24
|
self.logger.debug WhinyMassAssignment::bc :yellow, "Mass assignment whitelisting has not been specified for #{ WhinyMassAssignment::c [:bright, :red], self.class.name }" if self.logger
|
25
|
-
raise "Mass assignment whitelisting has not been specified for `#{self.class.name}`." if WhinyMassAssignment::Config.whitelist[:mode] == :raise
|
25
|
+
raise "Mass assignment whitelisting has not been specified for `#{self.class.name}` it is `#{mass_assignment_authorizer}`." if WhinyMassAssignment::Config.whitelist[:mode] == :raise
|
26
26
|
end
|
27
27
|
|
28
28
|
end
|