No commit activity in last 3 years
No release in over 3 years
This Rails plugin adds default_named_routes_options to your controllers and mailers, so you can specify default options for named routes like ActionMailer::Base.default_named_routes_options[:only_path] = false
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

About

This Rails plugin adds default_named_routes_options to the controllers and mailers. It comes handy for example when you are working on mailers. You have to specify the whole URI in your links, because otherwise these links obviously can’t work in these emails. To ensure this works, you have to specify a host via default_url_options method and then you need to specify only_path: false for each link in your mailer views. This is pretty annoying and of course when you forget about it, your clients won’t be very happy.

Usage

# this comes from Rails itself
ActionMailer::Base.default_url_options[:host] = "http://example.com"

# and this from the plugin
ActionMailer::Base.default_named_routes_options[:only_path] = false