Thanks! *Alexandre *it works :D

On Friday, October 3, 2014 9:25:23 PM UTC+2, Alexandre Calvão wrote:
>
> Adham,
>
> The code I posted was just to show you that Carrierwave requires that you 
> add a suffix "remote_" and a prefix '_url' to the parameter managed by 
> carrierwave, in order for it to work with urls.
>
> In your case the following code is not doing that, you are passing the the 
> parameter 'avatar' without the sufix and the prefix.
>
> user_controller.rb
>
> 28- @user = User.new(user_params)
>  
> def user_params params.require(:user).permit(:username, :name, :email, 
> :password, :password_confirmation, :age, :gender, :avatar) end
>
>
> You gotta find a way to pass 'remote_avatar_url' => 'http:://
> www.test.com/someimage.jpg'
>
> That is what carrierwave requires to work with url instead of files.
>
> []`s
>
>
> ===================
> *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 14:04 GMT-03:00 Hassan Schroeder <[email protected] 
> <javascript:>>:
>
>> On Fri, Oct 3, 2014 at 8:54 AM, Adham El-Deeb <[email protected] 
>> <javascript:>> wrote:
>> > there is no html on my app it is an API and i want to save the user 
>> from the
>> > User Model it self
>>
>> 1) What client are you using?
>> 2) What params are being logged for a create request?
>> 3) What does the log show for a request sequence?
>>
>> I have no experience with Carrierwave but are you sure that it's not
>> expecting a "remote_avatar_url" param by default, as Alexandre
>> suggested? That has nothing to do with whether you're using HTML
>> or not...
>>
>> --
>> Hassan Schroeder ------------------------ [email protected] 
>> <javascript:>
>> http://about.me/hassanschroeder
>> twitter: @hassan
>>
>> --
>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/rubyonrails-talk/CACmC4yAWm7QCuSLt_N5iwOqLORkWt_hRvOzbZ5rE_LwxRdg4%2Bg%40mail.gmail.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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/9d1c732a-a7fc-499a-a487-80b3cf1c29a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to