We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Currently, it's annoying to get filters by name:
class Interaction < ActiveInteraction::Base boolean :who_cares, :the_one_i_want end filter = Interaction.filters.find do |f| f.name == :the_one_i_want end
I think it would be better if you could treat .filters as a hash:
.filters
filter = Interaction.filters[:the_one_i_want]
The text was updated successfully, but these errors were encountered:
Makes sense to me.
Sorry, something went wrong.
As a result of this, I think we should remove the Filters class and replace it with a hash that maps names (as symbols) to Filters. For instance:
Filters
Filter
{ :who_cares => #<ActiveInteraction::BooleanFilter 0x...>, ... }
Agreed.
#108 might prevent us from replacing the Filters object with a hash.
Fix #103; allow getting filters by name
42a8aaf
tfausak
No branches or pull requests
Currently, it's annoying to get filters by name:
I think it would be better if you could treat
.filters
as a hash:The text was updated successfully, but these errors were encountered: