i´m new to Ruby and have some problems when i´m creating
new methods for my application. I read different tutorials and
understand the structure (okay, i thought i did ;-)).
Now i build my own little application where i have 4 models: the user,
book, category and booking. The booking model has among others 2 fields,
I have a list with bookings from a user, where i want show which books
he had lend from which category and show the difference between the end
and the start-date (not in words, mayby in days or hours). Around this
list i have an each do loop.
Now i have found different examples to create a method to get the
date difference, but i don´t know HOW i have to implent it in my
application, WHERE this method has to stand (in the Model or the
controller?) and how it has to look in the view.
thanks for your help!