Skip to content

Commit

Permalink
Fix #224; singularize filters inside arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
tfausak committed Sep 23, 2014
1 parent 721530a commit 9e46bce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/active_interaction/filters/array_filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def cast(value)

def method_missing(*, &block)
super do |klass, names, options|
filter = klass.new(name, options, &block)
filter = klass.new(name.to_s.singularize.to_sym, options, &block)

validate(filter, names)

filters[name] = filter
filters[filter.name] = filter
end
end

Expand Down

2 comments on commit 9e46bce

@AaronLasseigne
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests?

@tfausak
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops.

Please sign in to comment.