Hello, sorry for my english,
I have a model named Recipe
and Recipe has an attribute named duration
In my form, I have 2 dropdowns to get duration attribute
select_tag 'duration[hours]'
select_tag 'duration[minutes]'
I need the value of duration attribute like this format hh:mm:ss
I have tried with
def duration=(d)
self.duration = "#{d[:hours]}:#{d[:minutes]}:00"
end
but that is not working
help please
Thk in advice!