weppos / actionmailer_with_request

A simple plugin to make the Rails request context available for generating URLs in ActionMailer.
MIT License
54 stars 8 forks source link

[Rails 5] Deprecation warnings #12

Closed anthony-robin closed 7 years ago

anthony-robin commented 7 years ago

Using this gem with Rails 5 throw a deprecation warnings:

# before_filter => before_action
DEPRECATION WARNING: before_filter is deprecated and will be removed in Rails 5.1. 
Use before_action instead.

# alias_method_chain => Module#prepend
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead.
From module, you can access the original method using super.
eric1234 commented 7 years ago

This is actually fixed in PR #11 ....

anthony-robin commented 7 years ago

When does your PR will be merged ?

weppos commented 7 years ago

Merged.

anthony-robin commented 7 years ago

Thanks ! And about the gem any new release will be published to rubygems ?

weppos commented 7 years ago

Try to use master and let me know if it works.

anthony-robin commented 7 years ago

Actually, using master branch give me this error when running my tests:

# Extract of error
.rvm/gems/ruby-2.3.0/bundler/gems/actionmailer_with_request-3cf48f13aad8/lib/actionmailer_with_request.rb:1:in `require_relative': 
cannot load such file -- /.rvm/gems/ruby-2.3.0/bundler/gems/actionmailer_with_request-3cf48f13aad8/lib/version (LoadError)
from /.rvm/gems/ruby-2.3.0/bundler/gems/actionmailer_with_request-3cf48f13aad8/lib/actionmailer_with_request.rb:1:in `<top (required)>'
weppos commented 7 years ago

Thanks, it should be fixed now.

anthony-robin commented 7 years ago

still broken:

There was an error while trying to load the gem 'actionmailer-with-request'. (Bundler::GemRequireError)
Gem Load Error is: wrong number of arguments (given 0, expected 1)
Backtrace for gem load error is:
.rvm/gems/ruby-2.3.0/bundler/gems/actionmailer_with_request-10c0e2e15ba3/lib/actionmailer_with_request.rb:6:in `included'
...