define a method in your model that calculates the difference in hours:
def effort
{calculate the difference here}
end
That should probably do it, just have a google for Ruby and Dates
On Oct 17, 12:05 am, netdieter <[email protected]>
wrote:
> I'm new to rails and i'm glad to manage my first steps with AS.
> I like it
> But now i stuck.
> I have a model nemed effort, which consists of two datetime (start and
> end)
> How do i calculate the difference in hours and how do i get it on the
> view?
>
> Thanx,
> Dieter
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---