search for: add_observ

Displaying 4 results from an estimated 4 matches for "add_observ".

Did you mean: add_observer
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
2009 Nov 26
4
Is this a bug?
Hello all, while I''m using acts_as_audited(on jruby platform), after vendored the acts_as_audited, it reports some error, line 167, # Start observing the declared classes and their subclasses. def initialize Set.new(observed_classes + observed_subclasses).each { |klass| add_observer! klass } #this line end after some trace shows this one, when observed_classes is empty, will return 0(Fixnum) causes the above line to report error, def observed_subclasses observed_classes.sum([]) { |klass| klass.send(:subclasses) } end so I changed it to this: def observed_subclas...
2007 Jul 26
1
Lohan the observable
...Spears" celebs << britney paris = Celebrity.new paris.name = "Paris Hilton" celebs << paris rags = ["People Magazine","US Weekly","InTouch","CNN"].each do |name| mag = TrashMag.new mag.name = name celebs.each { |celeb| celeb.add_observer(mag) } end lohan.is = "trying to score coke while driving under the influence." britney.is = "attempting another comeback sans undergarments" paris.is = "such a morally sound person now that she''s been through jail" --~--~---------~--~----~-----------...
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