I tried next
post '/users/create' do
RestClient.post("http://localhost:3000/users", :user=>params['user'],
:avatar=>File.read("/home/qwerty1/Desktop/client/views/images.jpeg"),
:multipart=>true)
redirect '/users'
end
---------------------------------------
require 'paperclip'
class User < ActiveRecord::Base
has_attached_file :avatar, :styles=>{:thumb=>"100x100",
:medium=>"200x200"}
# validates_attachment_presence :avatar
end
but id didn't sent any image to server
Am I doing something wrong ?
--
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.