The way to workaround this is to setup your observers in ApplicationController instead of environment.rb adding this line to the app/controllers/application.rb:
observer :content_observer, :email_notifier, :web_notifier
I'm still testing the patch before I use it on my site and I'm guessing that's probably an oversight from the rails code, but the workaround seems to work for me.
Pascal
http://blog.nanorails.com
On 8/17/06, Trejkaz <[EMAIL PROTECTED]> wrote:
> Fun :-(. Well, email notifications work for me. If you can find a
> fix then I'll roll it up into 4.0.4.
Okay, I just did a web request and a console request and snipped the state
changes out of the logs of both for the purpose of comparison.
Here's what happens during a web request:
#<Comment:0xb6ef4fd0> leaving state ContentState::New
#<Comment:0xb6ef4fd0> entering state ContentState::Unclassified
#<Comment:0xb6ef61a0> leaving state ContentState::New
#<Comment:0xb6ef61a0> entering state ContentState::Published
#<Comment:0xb6ef61a0> leaving state ContentState::Published
#<Comment:0xb6ef61a0> entering state ContentState::Unclassified
#<Comment:0xb6ef61a0> leaving state ContentState::Unclassified
#<Comment:0xb6ef61a0> entering state Content::JustPresumedHam
#<Comment:0xb6ef61a0> leaving state Content::JustPresumedHam
#<Comment:0xb6ef61a0> entering state ContentState::PresumedHam
And here's a comment sent manually through the console:
#<Comment:0xb7579d40> leaving state ContentState::New
#<Comment:0xb7579d40> entering state ContentState::Unclassified
#<Comment:0xb7596a58> leaving state ContentState::New
#<Comment:0xb7596a58> entering state ContentState::Unclassified
#<Comment:0xb7596a58> leaving state ContentState::Unclassified
#<Comment:0xb7596a58> entering state Content::JustPresumedHam
(NOTIFICATIONS BEING SENT HERE)
#<Comment:0xb7596a58> leaving state Content::JustPresumedHam
#<Comment:0xb7596a58> entering state ContentState::PresumedHam
What's most interesting to me is how the console version never becomes
"published", and yet it's the only one where the notifications are sent.
TX
_______________________________________________
Typo-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/typo-list
_______________________________________________ Typo-list mailing list [email protected] http://rubyforge.org/mailman/listinfo/typo-list
