+
Skip to content

Conversation

shanna
Copy link
Contributor

@shanna shanna commented Sep 9, 2016

In Rails 4.0.0 (2012) DHH renamed the *_filter hooks in
AbstractController to *_action. In Rails 5.0 it now prints
deprecation warnings for *_filter calls as they will be removed
in Rails 5.1.

In Rails 4.0.0 (2012) DHH renamed the *_filter hooks in
AbstractController to *_action. In Rails 5.0 it now prints
deprecation warnings for *_filter calls as they will be removed
in Rails 5.1.
@FLarra
Copy link

FLarra commented Dec 19, 2016

Any chance to merge this and release? Now that Rails 5 is out since a while. Thanks!

skip_before_filter :verify_authenticity_token
before_filter :authenticate_mandrill_request!, :only => [:create]
skip_before_action :verify_authenticity_token
before_action :authenticate_mandrill_request!, :only => [:create]

Choose a reason for hiding this comment

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

maybe is better to do something like ...

    if respond_to?(:before_action)
      skip_before_action :verify_authenticity_token
      before_action :authenticate_mandrill_request!, :only => [:create]
    else
      skip_before_filter :verify_authenticity_token
      before_filter :authenticate_mandrill_request!, :only => [:create]
    end

So it works in older Rails versions.

Copy link
Member

Choose a reason for hiding this comment

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

@spastorino I like that idea. I just merged all the rails 5 efforts on master and took the easy way out "1.5.0+ only supports rails 5". If someone would like to try and bring back backwards compatibility, I'd really appreciate that.

spec.version = Mandrill::Rails::VERSION

spec.add_runtime_dependency "activesupport", ">= 3.0.3"
spec.add_runtime_dependency "activesupport", ">= 4.0.0"

Choose a reason for hiding this comment

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

And I wouldn't change this.

@tardate tardate merged commit 6bce3e4 into evendis:master May 12, 2017
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.

4 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载