This project is archived and is in readonly mode.
Add magic encoding comment to generated files
Reported by Robert Pankowecki | October 5th, 2010 @ 02:30 PM | in 3.0.2
rails g mailer 'absence/request_mailer' pending
generates such code:
class Absence::RequestMailer < ActionMailer::Base
default :from => "from@example.com"
# Subject can be set in your I18n file at config/locales/en.yml
# with the following lookup:
#
# en.request_mailer.new.subject
#
def pending
@greeting = "Hi"
mail :to => "rpa@gavdi.com"
end
end
The lookup in the comment is invalid in such case. It should
be:
en.absence.request_mailer.new.subject
Comments and changes to this ticket
-
Aditya Sanghi October 5th, 2010 @ 04:34 PM
- Assigned user set to Mikel Lindsaar
- Tag changed from autogenerated, comment, mailer, rails3 to autogenerated, comment, mailer, patch, rails3
This patch should solve the problem i believe. I couldn't find any tests to test the mailer generator however.
-
Ryan Bigg October 5th, 2010 @ 11:51 PM
- State changed from new to open
- Importance changed from to Low
The generators are in railties/test/generators. Please add a new test class for this in the mailer_generator.rb test file, using the arguments you have passed in to your test-run.
-
Ryan Bigg October 5th, 2010 @ 11:52 PM
- Tag changed from autogenerated, comment, mailer, patch, rails3 to mailer, rails3
-
Aditya Sanghi October 6th, 2010 @ 07:44 AM
Thanks for the tip Ryan. I've added a test method in the mailer_generator.rb for checking namespaced mailers. Updated the patch.
-
Aditya Sanghi October 6th, 2010 @ 07:45 AM
Thanks for the tip Ryan. I've added a test method in the mailer_generator.rb for checking namespaced mailers. Updated the patch.
-
Mikel Lindsaar October 6th, 2010 @ 09:30 AM
- Milestone cleared.
-
Mikel Lindsaar October 6th, 2010 @ 09:45 AM
- State changed from open to committed
Thanks for your work. I also pushed your changes to master. I merged the last two patches to increase the SNR.
-
Aditya Sanghi October 6th, 2010 @ 09:58 AM
Thanks Mikel,
I'm still a git white belt. I wonder how one can merge 2 commits into one? ..And i know what SNR stands for too now.
-
Mikel Lindsaar October 6th, 2010 @ 10:10 AM
Some git master I am sure could teach you, you can squash commits apparently :)
All I did was manually edit the second patch and voila :)
-
Robert Pankowecki November 22nd, 2010 @ 04:17 PM
When did the name of the bug changed from "invalid comment generated for namespaced-mailer" ? :-)
-
juicy April 10th, 2011 @ 09:40 AM
The weather becomes night, a little cool, sat in the room, still open, fan, the wind makes me feel less than that of static terrible night. Don't care about is blown dry ice, is the heart of ice, also.
-
sadie April 18th, 2011 @ 12:47 PM
The weather becomes night, a little cool, sat in the room, still open, fan, the wind makes me feel less than that of static terrible night. Don't care about is blown dry ice, is the heart of ice, also. Newspaper articles
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>