Skip to content
Browse files

Fixed broken case statement in merb-param-protection

  • Loading branch information...
1 parent 4549f0c commit 7589989a65ea33a14aa60016137ab75b1d995d10 @ddemaree ddemaree committed Jul 23, 2012
View
6 merb-param-protection/lib/merb-param-protection.rb
@@ -96,8 +96,10 @@ def validate_filtered_params(method, args)
# If the key exists on the opposite method, raise exception
if self.send(params_method).include?(key)
case method
- when :accessible_params_args : raise "Cannot make accessible a controller (#{self}) that is already protected"
- when :protected_params_args : raise "Cannot protect controller (#{self}) that is already accessible"
+ when :accessible_params_args
+ raise "Cannot make accessible a controller (#{self}) that is already protected"
+ when :protected_params_args
+ raise "Cannot protect controller (#{self}) that is already accessible"
end
end
end
View
31 merb-param-protection/merb-param-protection.gemspec
@@ -0,0 +1,31 @@
+# -*- encoding: utf-8 -*-
+
+Gem::Specification.new do |s|
+ s.name = "merb-param-protection"
+ s.version = "1.0.11"
+
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
+ s.authors = ["Lance Carlson"]
+ s.date = "2009-03-31"
+ s.description = "Merb plugin that provides params_accessible and params_protected class methods"
+ s.email = "lancecarlson@gmail.com"
+ s.extra_rdoc_files = ["README", "LICENSE"]
+ s.files = ["README", "LICENSE"]
+ s.homepage = "http://merbivore.com"
+ s.require_paths = ["lib"]
+ s.rubyforge_project = "merb"
+ s.rubygems_version = "1.8.11"
+ s.summary = "Merb plugin that provides params_accessible and params_protected class methods"
+
+ if s.respond_to? :specification_version then
+ s.specification_version = 3
+
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
+ s.add_runtime_dependency(%q<merb-core>, [">= 1.0.11"])
+ else
+ s.add_dependency(%q<merb-core>, [">= 1.0.11"])
+ end
+ else
+ s.add_dependency(%q<merb-core>, [">= 1.0.11"])
+ end
+end

0 comments on commit 7589989

Please sign in to comment.
Something went wrong with that request. Please try again.