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

Allow validations in before filter #306

Merged

Conversation

dprice-fiksu
Copy link
Contributor

Addresses issue #168, 'validators executes after before_filter'. Adds the ability to call APIpie validations as a before_filter, instead of by wrapping the controller method (but preserves the old behaviour as the default).

@iNecas
Copy link
Member

iNecas commented Nov 18, 2014

Thanks for this. Looks good at the first sigh. It would be nice to have there also :implicit option or something like that, that would use the before_filter, but being turned on by default: as a migration path from the old style, that I would expect to get deprecated soonish.

Waiting for green tests.

@dprice-fiksu
Copy link
Contributor Author

I'll have a look at the :implicit idea. Unfortunately this is for the moment a spare time project and only gets worked on irregularly.

@dprice-fiksu
Copy link
Contributor Author

I'm done changing this now, please take another look.

@mtparet
Copy link
Contributor

mtparet commented Dec 2, 2014

👍 to use before_filter
I think it should be also good to let the user include/extend Apipie in which controllers he wants.
(Instead of loading it everywhere https://github.com/Apipie/apipie-rails/blob/master/lib/apipie/railtie.rb#L5)

@iNecas
Copy link
Member

iNecas commented Dec 8, 2014

Thank you very much for your time, merging now

iNecas added a commit that referenced this pull request Dec 8, 2014
…_filter

Allow validations in before filter
@iNecas iNecas merged commit 47e45f0 into Apipie:master Dec 8, 2014
@iNecas
Copy link
Member

iNecas commented Jan 7, 2015

I'm happy to announce that the new version 0.3.0 was released, including this change. Thanks for making that happen https://github.com/Apipie/apipie-rails/blob/master/CHANGELOG.md#v030

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants