Ruby on Rails Monday, April 7, 2014

I'm not 100% sure but I think is called "avatar". Below is the table of users that is in the database.


     id = 1
               name = alf
    password_digest = $2a$10$CKi0spNsaEpozAJ9voAHJ.hH76Ca0hdmGCePVVvvXHHS9qQ8CDARC
              photo = alf
         created_at = 2014-04-07 12:54:07.328582
         updated_at = 2014-04-07 12:54:07.328582
   avatar_file_name = alf.jpg
avatar_content_type = image/jpeg
   avatar_file_size = 12425
  avatar_updated_at = 2014-04-07 12:54:07.173774

Could you check if is good configured?.


I'm also having a new error. When I try to print all the pictures that the user has with the following line, Ruby does not recognize the data.

users/show.html.erb => <% @photos.each do |product| %>
users_controller.rb => @photos = Photo.order(:title)

Could you please check why I can't acces to the data of Photos?. The browser give me this error =>
undefined method `each' for nil:NilClass

Thank you and sorry for the long text :(

Regards.

El sábado, 5 de abril de 2014 14:55:59 UTC+8, Alfredo Barrero escribió:
Good afternoon everyone.


Im using the gem Paperclip in order to upload the images of the users to my server. But I having problems with it. I don't know how to resize the image size after uploading the image.

I'm using CSS to try to change the size but is not working. I think Paperclip is showing the exactly size that it was saved. Could anyone help me?.


Another question is about the location of the pictures that the gem Paperclip is using. When I add a picture with this gem, Where it is saved?.


Thank you & best regards.

Alfredo.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/32b28d2f-6c52-40b4-beb6-beeabe823052%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment