On May 17, 2013, at 9:48 PM, Niels Buus wrote:
> I don''t know if this is appropriate for this forum, so please
kindly dicipline me, if I am out of line. :-)
>
> Some days ago, as I was working on a Rails project, it occured to me that
numerical values on ActiveRecord objects can be kind of annoying to work with
and I got an idea for a solution that would give me an opportunity to dwell into
metaprogramming and gem development - two fields on which I have no prior
experience. The basic idea is to declare the units used in numeral attributes
and exploit that knowledge for formatting and conversion purposes. Perhaps this
has already been done before, although I wasn''t able to find anything
in a few quick Google searches.
>
> Anyway, Instead of repeating myself, I''d like you to skim the
README on this new project of mine:
>
> https://github.com/nielsbuus/united_attributes
>
> I would really appreciate feedback on whether this is a good idea. And
secondly, if you have the time, I''d would be nice to get some feedback
on the details of the implementation as well. I know it has no specs yet, but
that''s because I''m using a Try-Driven Development process
whenever venturing into new things. =)
This is really cool, thanks for doing this! I can see a problem ahead for
currency -- I built a currency converter a while back that relied on a lookup of
the current day''s exchange rates. Not a pretty thing. You sort of tease
at that with your £ vs # when discussing the duck, just letting you know that
while your premise is extremely tight, and your execution as I see it here is
really neatly done, that particular detail will make you cry when it comes time
to make it real.
Walter
>
> // Niels Buus
>
> --
> You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit
https://groups.google.com/d/msgid/rubyonrails-talk/ca689a82-dcef-499d-a641-ca473677e20b%40googlegroups.com?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.