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
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 version of another field (the full text). So far, I have tried
adding the following to app/models/article.rb but it won’t work.
if self.intro == “”
self.intro = truncate(self.text)
Any ideas why I get nothing here?