search for: winsmith

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

Did you mean: winksmith
2006 Jun 21
8
Modifying Model Output
Hi! I''m a very-very new Ruby-on-Rails user even if I have some experience with other Languages (mostly PHP, so this is my first real object-oriented language) My problem, newbie-ish as it is, is the following: I have a model, Article, that returns Articles from the DB. Now, when a certain field of the model (the intro text) contains no data, I want to fill it with a truncated
2006 Jul 07
4
Calling a method each time an ActiveRecord Object is accessd
Hi, I know that it is possible to execute code each time data is saved into a model by using the +validate+ method. However, is there also a way to execute code each time the data is accessed, not just when it is changed? Bye, Winsmith -- Posted via http://www.ruby-forum.com/.