Hi Joe,
An unrelated question … I am trying to use action mailer but I am
having
problems with the views … Where exactly do the variables in the view
come
from .For example in your code you use @url. Is this an instance
variable
you created in your Mailer < ActionMailer::Base ?
Thanks
Vivek
Anyone know the status of this? I’m running into the same problem
using Rails 1.0.
I tried to search dev.rubyonrails.org but couldn’t figure out how to
search the bug list. I tried filtering, but clicking the ‘plus’
filter button didn’t seem to do anything remotely useful.
I am trying to use action mailer but I am having problems with the
views … Where exactly do the variables in the view come from .For
example in your code you use @url. Is this an instance variable you
created in your Mailer < ActionMailer::Base ?
They’re defined either as instance variables, or as hash parameters
to the render_message() function. For your reference, a large snippet
from the top of the ActionMailer::Base docs:
class ApplicationMailer < ActionMailer::Base
# Set up properties
# Properties can also be specified via accessor methods
# (i.e. self.subject = “foo”) and instance variables (@subject =
“foo”).
def signup_notification(recipient)
recipients recipient.email_address_with_name
subject “New account information”
body { “account” => recipient }
from “[email protected]”
end
# explicitly specify multipart messages
def signup_notification(recipient)
recipients recipient.email_address_with_name
subject "New account information"
from "[email protected]"
part :content_type => "text/html",
:body => render_message("signup-as-html", :account =>
recipient)
part "text/plain" do |p|
p.body = render_message("signup-as-plain", :account =>
I am creating a ruby app which allows users to request changes to the
DB. The requests will be routed to the DBA and the DBA will authorize
it. So far good. No issues. The issue arises when I want to give the
DBA an option of migrating the changes to other schemas as well. How do
I have more than one schema mapped to one app?
Hi Joe,
An unrelated question … I am trying to use action mailer but I am having
problems with the views … Where exactly do the variables in the view come
from .For example in your code you use @url. Is this an instance variable
you created in your Mailer < ActionMailer::Base ?
In whatever Mailer action you’re working with, put
@body[:url] = whatever a url is
Then, in the views, you’ll have access to the @url instance variable.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.