search for: write_inheritable_array

Displaying 5 results from an estimated 5 matches for "write_inheritable_array".

2006 Jan 13
1
association callbacks
...abtm_callbacks reflect_on_all_associations.each{ |association| if association.macro == :has_and_belongs_to_many #add_callback add_callback = "before_add_for_#{association.name}" class_inheritable_reader(add_callback.to_sym) write_inheritable_array(add_callback.to_sym, [:log_add]) #remove_callback remove_callback = "before_remove_for_#{association.name}" class_inheritable_reader(remove_callback.to_sym) write_inheritable_array(remove_callback.to_sym, [:log_remove]) end...
2006 Aug 01
8
Decoupled observers for controllers?
In the Rails Recipes book the recipe "Keeping track of who did what" explains how to do decoupled observing of models. In my application I''d like to do a similar thing but watching the controllers. For example, when somebody hits the login method of the Security controller, I''d like to make a note of it. In this case I could observe the User model and watch for
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
2011 Nov 09
14
Rony 1.9.3-p0 on Rails 2.3.x: the helpers "require" problem
Yes, I know that Rails *2.3.x* is no longer fully supported (this is why I''m posting it to rails/issues). Still, I would like to post the topic so that everyone who experience the same problem could quickly google for it (no, afaik no solution for this yet). I''m trying to migrate a 1.5 years *2.3.x* app from Ruby version *1.8.7* to * 1.9.3-p0*. The strange problem I
2006 Jul 27
9
Introspecting validates_presence_of
Hello people, I''d like to detect whether an attribute of a model has vaildates_presence_of applied to it so I can automatically apply a mandatory (*) to the field...it doesn''t look easy...any ideas? Cheers, -- Dan Webb http://www.danwebb.net