As part of my ongoing career quest to become full-stack, there's several tasks I must complete, such as:
Storm the castle
Slay the dragon
Save th...
For further actions, you may consider blocking this person and/or reporting abuse
Over my time using Rails I drifted in and out of using presenters. I don't know why though, they do make things a whole bunch easier and let the controller just get on with its job.
Did you consider writing tests for your presenter in this case?
I did briefly, although I haven't been focusing on testing enough as I should be lately. Is it normal practice to write presenter tests? I just assumed each presenter should have its own tests to ensure all the data is calculated and modified correctly.
I would normally write tests for a presenter if I was writing one, exactly as you put it, to ensure that the calculations are correct.
One other thing I was interested in, you used
delegate
to delegate methods on your presenter to the underlying@category
but also defined theid
,created_at
andbudget
methods. Was there a reason for that?