This project is archived and is in readonly mode.
simple_format behaviour changed when used in Mailer view
-
mat
Yeah, this is pretty poor form... here's the commit: https://github.com/rails/rails/commit/4083e0ea2ae6f87929a32935122f2...
Pretty much just need to rename the method.
-
mat
Pull request: https://github.com/rails/rails/pull/210
-
mat
Or patch, if you prefer.
-
José Valim
- State changed from new to resolved
- Milestone set to 3.1
- Assigned user set to José Valim
- Importance changed from to Low
Applied.
-
Xavier Shay
Any reason this can't be in 3-0-stable? There is an additional regression in that this method now raises on nil, whereas it used to return a blank string.
-
Xavier Shay
Further, since this is only a private refactoring, there is no public or even semi-public interface to worry about breaking.
-
visnu
+1 on bringing it into 3-0-stable. I'm sitting at 3.0.4 due to this bug in 3.0.5 (and having used simple_format in mailer templates).
-
Jason T Johnson
This is also breaking my mailer templates, since the original method expects the second argument to be a hash and the one in MailHelper expects a fixnum. (I started getting "comparison of Fixnum with Hash failed" exceptions.)
-
Bayan Khalili
+1 to bring this back to 3.0-stable. This is where the problem was introduced, and I don't see a good reason why it can't be backported.
-
Ricardo Panaggio
+1 to backport
-
Ricardo Panaggio
We'll maintain a patched fork for that until it's backported: https://github.com/umamao/rails
We're using 3.0.7, so I only patched the respective branch. If you need any older branch, let me know.
-
Arthur Klepchukov
Without downgrading back to 3.0.4, I'm doing the following in my ActionMailer views to have access to the original simple_format:
ActionView::Base.new.simple_formatIf there's a better or easier way, please share :)
