and dont forget to add height and  width to the attr_accessible list and fix
this

height = dimensions.height
 width = dimensions.width

to

 self.height = dimensions.height
  self.width = dimensions.width


also you can remove the style from

has_attached_file :photo, :styles => {
 :original => ["100%", :jpg] ,
 }


to

has_attached_file :photo



and you have an extra comma that does not goes there


at the end it should look similar to this


has_attached_file :image,
    :url  => "/system/assets/images/:id/:style/:basename.:extension",
    :path =>
":rails_root/public/system/assets/images/:id/:style/:basename.:extension"
  validates_attachment_presence :image
  validates_attachment_size :image, :less_than=> 800.kilobytes
  validates_attachment_content_type :image, :content_type => %r{image/.*}

the red charactesr means you should but the size you want there, you can
remove

validates_attachment_size :image, :less_than=> 800.kilobytes

if you dont want to set a limit.



/*********************************/

my replies  have many typos , some time i write   'user' instead of 'used'
and 'is' instead of 'if'
you may want to check that in case something is not clear

-- 
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-t...@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.

Reply via email to