Ruby on Rails
Friday, October 3, 2014
there is no html on my app it is an API and i want to save the user from the User Model it self
On Friday, October 3, 2014 5:20:16 PM UTC+2, Alexandre Calvão wrote:
-- On Friday, October 3, 2014 5:20:16 PM UTC+2, Alexandre Calvão wrote:
From the carrierwave documentation<%= form_for @user, :html => {:multipart => true} do |f| %> <p> <label>My Avatar URL:</label> <%= image_tag(@user.avatar_url) if @user.avatar? %> <%= f.text_field :remote_avatar_url %> </p> <% end %>It means that the parameter avatar should have the '_url' sufix.You can make a before_filter to change that, or a Service Object that would properly save the User with the correct parameter.
===================
Alexandre Mondaini Calvão
"Nossa recompensa se encontra no esforço e não no resultado. Um esforço total é uma vitória completa." [Ghandi]2014-10-03 0:10 GMT-03:00 Adham El-Deeb <adham.e...@gmail.com>:I'm using Rails-api with mongoid.--I try to upload user avatar using Carrierwave from a remote url.I got theremote url form omniauth-facebookimage params. The problem is the avatar field in Databass have nil value after save.
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-ta...@googlegroups.com .
To post to this group, send email to rubyonra...@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/ .5d0eee57-fa44-4a34-b692- ee394733e2fa%40googlegroups. com
For more options, visit https://groups.google.com/d/optout .
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/c6bd0884-694e-4ed5-8896-ed20bebdd21b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment