Topic: POST Image_tag to controller


I'm trying to get the value from the image_tag into my apply_controller.

I have gisted the following code: … 443b92fba6
This included the index.html.erb the partial _personal_info and my apply_helper.

Now more information about what I'm trying to do:
I'm making a profile picture the user can either get it from Linkedin or Upload it's own. When the user get's it from linkedin it's shown via an image_tag:

If it's filled it should be transfered to the apply_controller for further handling but this does not work sad

Thanks for the help!

Kind regards,

Re: POST Image_tag to controller

I was advised to try only with the following code:

image_tag("user.png", :alt => "profile_pic", :id => "profile_pic") 

But params["profile_pic"] is still nil.

Also tried:

     raw("<img id='profile_pic' name='profile_pic' src='/assets/user.png'/>")


 image_tag('user.png', :profile_pic =>'test') 

:profile_pic = "test"

personal_info[profile_pic] = "test"

Last edited by vwou (2013-05-21 05:44:05)

Re: POST Image_tag to controller

This can be done via: Session Variable / Rails Environment Variable or via Hidden Field, what's the Rails way of doing that ?

Re: POST Image_tag to controller

SOLVED: used hidden_field