search for: notify_observ

Displaying 9 results from an estimated 9 matches for "notify_observ".

Did you mean: notify_observer
2006 Sep 15
2
Caching::Sweeper Access to Controller
...weeper.rb:9:in `after_update'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/observer.rb:123:in `send'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ active_record/observer.rb:123:in `update'' /usr/lib/ruby/1.8/observer.rb:185:in `notify_observers'' /usr/lib/ruby/1.8/observer.rb:184:in `each'' /usr/lib/ruby/1.8/observer.rb:184:in `notify_observers'' Here''s my code (the problem is with ''controller'' being nil): def log(record, event, user = controller.session[:user]) a = Aud...
2010 Jan 25
1
ActionMailer does not find templates in production mode
...gorithm does not seem to pick up the corresponding template: ActionView::MissingTemplate (Missing template event_mailer/approval_requested_notification.erb in view path app/views): app/models/event_observer.rb:3:in `after_enter_awaiting_approval'' /usr/lib/ruby/1.8/observer.rb:185:in `notify_observers'' /usr/lib/ruby/1.8/observer.rb:184:in `each'' /usr/lib/ruby/1.8/observer.rb:184:in `notify_observers'' (eval):10:in `create_or_update_without_callbacks'' app/controllers/event_controller.rb:71:in `request_approval'' public/dispatch.fcgi:24 Howe...
2006 Jun 08
1
Observable notifying a controller.
I want to code the following task: I have a class, for instance, class A with is a observable. I want to add a controller of my rails system to this class. So I can notify_observer, and it updates all controllers of my system. How do I pass a controller as a parameter to the add_observer() method? And where I put this code? Thanks in advance. Fernando Lujan
2005 Jun 25
2
observing a habtm association
Is there some way to observe when an association is added in a habtm relationship? I know I could turn the relationship into a model, but I don''t want to give up using :include in my finds... joshua
2010 Apr 16
1
Active Record observers broken: can't be used for "before" callbacks
...activerecord-observers-cant-be-used-for-before-callbacks> I think it''s a pretty big bug. In Rails 3, creating an observer with a "before_save" callback (for instance) will result in all observed models being *unable to save*, unconditionally. This is because the key method (`notify_observers`) of "Observable" module from Ruby (in use here) is always returning false, without giving us access to the return value of callback methods. The only way of fixing it is to stop using the Ruby implementation which doesn''t give us access to return values of callback methods....
2007 Jul 26
1
Lohan the observable
...ed to find that Ruby has a built in Observable module and I''m pretty bored, so I apologize in advance.... require ''observer'' # one who is observed class Celebrity include Observable attr_accessor :name attr_reader :is def is=(val) @is = val changed notify_observers(self) end end # one who does the observering class TrashMag attr_accessor :name def update(sender) puts "#{name}''s Breaking News: OMG! #{sender.name} is #{sender.is}. KeWl!!!!" end end celebs = [] lohan = Celebrity.new lohan.name = "Lindsey Lohan" cele...
2006 Oct 24
1
Locking issues when adding to the Index
...index.rb: 254:in `<<'' /app/models/index.rb:105:in `add'' /app/models/index.rb:20:in `after_create'' /usr/lib/ruby/gems/1.8/gems/activerecord-1.14.4.5263/lib/ active_record/observer.rb:154:in `update'' /usr/lib/ruby/1.8/observer.rb:185:in `notify_observers'' [...]
2006 Jul 05
2
Serialized object behaves weird
Hi! I got a class named EinsatzFilter which I serialized to session. Before saving to session it works afterwards I keep getting the message: "undefined method `to_s'' for #<Person:0x38c6ab8>". "Person" is a from ActiveRecord::Base inherited class. Code: class EinsatzFilter include ApplicationHelper attr_reader :personen, :monat, :projekte, :kunde
2008 Apr 09
5
intermittent BJ errors
hi all I''m running background tasks using BJ 1.0.1 (gem version). On some requests, the tasks are executed as expected. On others, I get the following error: RuntimeError (no bj found in ["/u/apps/igniter/releases/20080408205801/ script", "/bin", "/usr/bin", "/sbin", "/usr/sbin"]): when it runs, it runs fine but does anyone know what