Thanks for your help!
The 2 columns in the booking model are end_at and start_at and i need
the difference between these two dates in minutes. In the booking model
i want to do something like this:
booking.rb
def date_diff
minutes = Booking.new
date2 = Time.end_at
date1 = Time.start_at
difference = date2 - date1
minutes = (difference % 3600) / 60
end
booking.controller
???
I´m aware that this method doesn´t work but have problemes to bring it
in the right form. And how does the view helper has to look like?
--
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.