Thanks, Mikel. We're half way there, I guess:

> No, book is a class, I assume at least.
> 
> Probably in your models directory you have a book.rb file that has
> 
> class Book < ActiveRecord::Base
> <stuff>
> end

Yes, that's the case.

> You probably want a column called number_of_pages in your books table
> 
> Then you can do:
> book.number_of_pages = 123
> book.number_of_pages #=> 123

Not really. Actually, I don't want to store the "number_of_pages" in a 
database, I'd just lik to add it "on the fly" to each "book" to be able 
to display it in the view, for each "book".

Is this possible in my case?
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to