Displaying 2 results from an estimated 2 matches for "request_admin_approval".
2007 Apr 06
3
Mailer method missing
Rails dies when I try to call a method from my Mailer. But I have
defined my method. What could I have missed? Here is the irb session:
>> p = Person.find(1)
=> Person data...
>> SiteMailer.request_admin_approval(p)
NoMethodError: undefined method `request_admin_approval'' for
SiteMailer:Class
>> SiteMailer.method_defined? :request_admin_approval
=> true
The method code:
class SiteMailer < ActionMailer::Base
def request_admin_approval(person)
@subject = ''Waterc...
2007 Apr 10
5
Difficulty with body in ActionMailer
AWRDwRv2 is pretty vague on the @body part of setting up a mailer. Here
is my problem:
>> p = Person.find(1)
=> #<Person:0x45c944c>
>> SiteMailer.request_admin_approval(p)
NoMethodError: You have a nil object when you didn''t expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.[]=
from site_mailer.rb:10:in `request_admin_approval''
from (irb):2
ln def self.request_admin_approval(person)...