updated deprecated before_filter

Hello, and thank you for the great work on this plugin.
I updated the ```before_filter``` method which is deprecated to the new ```before_action```
If you are happy with this I will update other parts of the code too whenever I come across them.

Thank you again
Stefano