Thanks @radhames for your thorough explanation.

I still have the same issue. I think I may have a problem in making an 
instantiation.

My model now is as follows:

class Dicom < ActiveRecord::Base
  has_attached_file :photo, :styles => {
  :original => ["100%", :jpg],
  }

  def before_save
  uploaded_file = photo.queued_for_write[:original]
  dimensions = Paperclip::Geometry.from_file(uploaded_file)
  height = dimensions.height
  width = dimensions.width
  end
end

And, I have done this in "show.html.erb":

<canvas id="draw" height="<%[email protected]%>" width="<%[email protected]%>" 
>

What am I missing?

Thanks a lot.
-- 
Posted via http://www.ruby-forum.com/.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to