diff --git a/lib/param_protected/controller_modifications.rb b/lib/param_protected/controller_modifications.rb index d72194d..c0c3fb0 100644 --- a/lib/param_protected/controller_modifications.rb +++ b/lib/param_protected/controller_modifications.rb @@ -12,11 +12,13 @@ def self.extended(action_controller) module ClassMethods - def param_protected(params, actions = nil) + def param_protected(*params) + actions = params.extract_options! Protector.instance(self).declare_protection(params, actions, BLACKLIST) end - def param_accessible(params, actions = nil) + def param_accessible(*params) + actions = params.extract_options! Protector.instance(self).declare_protection(params, actions, WHITELIST) end