Displaying 2 results from an estimated 2 matches for "number_to_human_size".
2006 Jul 14
0
NumberHelper.number_to_human_size
I doubt this is the correct place to post this but I was unable to post
to rails-core so I am posting here. Please let me know if there is a
better place to send this.
NumberHelper.number_to_human_size returns ''KB'' as the abbreviation for
kilobyte. According to the SI standards kilobyte should be abbreviated
''kB''. I know this a v ery minor issue but my boss is concerned enough
about it that I have to write a new human_size helper...
Thanks,
-jesse
--
Post...
2008 Jan 22
4
Calling a function
...ption(image)'' at line
9. However when I do, I get the error "undefined method
''store_description'' for Photo:Class". What can I do?
1: class Photo < ActiveRecord::Base
2: def store_description (image)
3: self.description = "size:
"+number_to_human_size(image.filesize)
4: end
5: file_column :image, :magick => {
6: :versions => {
7: "thumb" => {
8: :transformation => Proc.new { |image|
9: store_description(image) # what do I put
here???
10:...