Displaying 1 result from an estimated 1 matches for "books_created_right_now".
2010 Jun 26
4
Time-dependent values/constants in Models: An issue or not?
...Model will always return the same value for those
''constants'', i.e. the value the ''constant'' had at server start."
Hypothetic example for the MySQL ''constant'' "UTC_TIMESTAMP()" in a Model
''User'':
=====
def books_created_right_now
self.books.find(:all, :conditions => "books.updated_at =
UTC_TIMESTAMP()")
end
=====
Is the above statement utter BS or is there actually some issue similar
to the example or statement?
Thanks a lot!
Tom
--
Posted via http://www.ruby-forum.com/.
--
You received this messag...