Skip to content

Commit

Permalink
Multiple parameters can be ignored at once
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Hines committed Jan 5, 2016
1 parent 64e49f3 commit ed9ca35
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions lib/params_deserializers/params_deserializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,10 @@ def attribute(attr, options = {})
end
end

def ignore(attr)
attrs << Attribute.new(attr, ignored: true)
def ignore(*param_names)
param_names.each do |param_name|
attrs << Attribute.new(param_name, ignored: true)
end
end

def attributes(*args)
Expand Down
2 changes: 1 addition & 1 deletion lib/params_deserializers/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@
# POSSIBILITY OF SUCH DAMAGE.

module ParamsDeserializers
VERSION = "1.1.0"
VERSION = "1.1.1"
end

0 comments on commit ed9ca35

Please sign in to comment.