On Nov 8, 12:59 pm, 7H3LaughingMan <austin.brk...@gmail.com> wrote:
> Now then my only question now is where can I put the universal methods
> that are going to be used by Models and Views, and Controllers /
> Helpers if they need to be used by them. I read somewhere where you
> would put it but since then I have forgotten and can't find it again.
Marmen's code goes a long way towards making this more reusable. The
only thing that I'd recommend that you look at if you end up using
many 'cost' attributes is a meta-definition helper for the fields, so
you could say:
dnd_money_field :cost
in the class level and get the cost= method and so on.
--Matt Jones
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---