On 6/14/06, Jamis Buck <[EMAIL PROTECTED]> wrote:
Note that Strongspace and bittorent *display* the number as KiB, etc. You can still do that in Rails--the Numeric#kilobyte method is for programmers to call--it's up to you to tell the user what the units are. Thus, there is nothing preventing you from saying, in a view: <%= size.kilobytes %> KiB
Right, there is nothing preventing you and the calculation presented is absolutely correct. Just that most of the people wouldn't write it like that; they would use a helper for this (that displays "KB"). So in fact this is encouraging developers to measure, speak and display in wrong units.
But that's not the issue that started all of this. What is under discussion right now is not displaying the "proper" units to the user, it is making a helper with with the "proper" name available to the developer.
I admit that I may have used some wrong examples, but these things go together. In my opinion, proper names in the framework are fundamental to calculating and displaying values to users. I couldn't write <%= size.kilobytes %> KiB as well as I couldn't write $<%= price.to_euros %> The plugin is definitely coming this way. Until it comes it is either the patch or the half-patch for all of you who want to adopt this. Since I don't have an SVN host available I would appreciate if someone would host it with me having commit rights to it. What about capitalization in the helper, "Bytes" and "KB"? Might at least this be corrected without needing a plugin? Thank you all who submitted your opinions on this subject, Mislav _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core