Skip to content
New issue

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

Should import_filters behave like Rails' before_filter? #114

Closed
tfausak opened this issue Jan 22, 2014 · 0 comments
Closed

Should import_filters behave like Rails' before_filter? #114

tfausak opened this issue Jan 22, 2014 · 0 comments
Assignees
Milestone

Comments

@tfausak
Copy link
Collaborator

tfausak commented Jan 22, 2014

I think the :only and :except options on import_filters should behave like the ones on Rails' before_filter and friends. In particular:

  • You should be able to pass both :only and :except.

    import_filters Interaction,
      only: [:a, :b],
      except: [:b]
    # => Imports :a from Interaction.
  • You should be able to pass a single symbol.

    import_filters Interaction,
      only: :a
    # => Imports :a from Interaction.

I changed how it behaved in a25f3c3, but I'm not sure if that was the right decision.

tfausak added a commit that referenced this issue Jan 28, 2014
@ghost ghost assigned tfausak Jan 28, 2014
tfausak added a commit that referenced this issue Jan 28, 2014
Fix #114; make import_filters behave like before_filter
@tfausak tfausak closed this as completed Jan 28, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant