search for: post_observer

Displaying 2 results from an estimated 2 matches for "post_observer".

Did you mean: host_observer
2011 Dec 02
2
problem setting expectation for test with delayed::job
I''ve got something like this: # post_observer.rb after_create # ...stuff Delayed::Job.enqueue(PostSharer.new(post, post.user)) end ... # post_sharer.rb class PostSharer < Struct.new(:post, user) def perform # Delayed::Job calls .perform on the object passed into enqueue end end # post_controller_spec.rb it "shares t...
2006 Apr 28
0
Minimum needed to observe a model
I have a model called Post and a observer called PostObserver. I also have in environment.rb file the line: config.active_record.observers = :post_observer I read that observers default to the model with the same name, but the model class isn''t being observed. Observe works if I put in the ForumController: observer :post_observer But this doesn''t seem right. Jose -- Posted via http://www.ruby-forum.com/.