Git Product home page Git Product logo

actionmailer_with_request's Introduction

ActionMailer with Request

This is a simple plugin that aims to solve the problem to pass a dynamic host for generating URLs in ActionMailer.

For more information, read my blog post at http://www.simonecarletti.com/blog/2009/10/actionmailer-and-host-value/

Requirements

  • Rails 5

For an older versions of Ruby use a previous release.

Installation

You can install the gem manually:

$ gem install actionmailer-with-request

Or use Bundler and define it as a dependency in your Gemfile:

gem 'actionmailer-with-request'

Changelog

See the CHANGELOG.md file for details.

License

Copyright (c) 2009-2017 Simone Carletti. This is Free Software distributed under the MIT license.

actionmailer_with_request's People

Contributors

codegoalie avatar eric1234 avatar jaggederest avatar weppos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

actionmailer_with_request's Issues

Rails 2 support

The README says: ActionMailerWithRequest >= 0.3 requires Rails 3. Use TabsOnRails 0.2.x with Rails 2.

I'm not sure how TabsOnRails is related, but it doesn't seem to contain any ActionMailer code. There is also not a actionmailer-with-request gem version 0.2.x listed here https://rubygems.org/gems/actionmailer-with-request

Is there a version which works with Rails 2?

Use RequestStore instead of Thread.current if available

I don't use ActionMailer so I won't make a pull request myself, but I answered a question on SO and recommended your gem as it sounds like a solution to the problem (http://stackoverflow.com/questions/29658271/rails-request-url-getting-undefined-local-variable-in-mailer/29699048#29699048).

I just looked at the sources and found that you're using Thread.current to store the request. You should maybe use RequestStore or something similar if available, because Thread.current may not give you the value you want with e.g. Puma, or more likely, you'll get a value when you don't expect one.

Example: https://github.com/Aethelflaed/mongoid-userstamps/blob/master/lib/mongoid/userstamps/config.rb#L65

[Rails 5] Deprecation warnings

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.

available as gem?

i found this as a gem on rubygems, however i can only get it to work as a plugin.

is the gem an older version?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.