Displaying 3 results from an estimated 3 matches for "deliver_activation".
2008 May 02
4
spec''ing calls to super (or other Ruby keywords)
Hi there,
How does one spec an invocation of a Ruby keyword, such as super in this
case?
class User < ActiveResource::Base
# faking the ActiveRecord before/after_save observers
def save
super
UserMailer.deliver_activation(self) if recently_activated?
end
end
Does the solution look anything like the following?
describe User do
describe ''#save'' do
it "should call save on the parent class" do
# something.should_receive(:something)
@user.save
end
end
end
Any thoug...
2008 Apr 25
6
ActionMailer
Hi all,
I need a help. I have got a user registration form, where the user signs
up and then an activation link is sent to the user email id for
activating his/her account. Now I need to send an another email to the
user, only after he logs in for the first time in my site, then the
second email should be sent. Can anybody give me some suggestion on how
to do it ??
NB: When the user clicks on
2007 Nov 12
1
help debugging ActionMailer with restful_authentication?
...=> :login,
:user_name => "patelc75" ,
:password => "irdiktanic" ,
}
Here''s the delivery code:
class UserObserver < ActiveRecord::Observer
def after_create(user)
UserMailer.deliver_signup_notification(user)
end
def after_save(user)
UserMailer.deliver_activation(user) if user.recently_activated?
end
end
Thanks!
Chirag
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3...