I have a button as below.

<%= button_to('On', @userdetail.url + '?value=1', :method => "post", :remote => 
true, :disable_with => 'loading...') %>

In the button above, @userdetail.url is an external url. But I don't want 
to show that external url when somebody does a view source. 
Is there any way I can achieve it. 
Writing a controller action will do so, but I am not able to make 
everything work through controller action. 
Here's what I tried. 
In a controller action how can I define a post method. 
Should I execute a curl post call to achieve this.

Should I try something like this in controller action.

def button_action
   @userdetail = Userdetail.find(params[:id])
   curl @userdetail.url + "?value=" + value    
end

and define a route. I tried this but it didn't work.

Any live example to do a post to external URL via controller action and 
using the same in the button_to will help.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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].
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to