I'm trying to create a form that a user can submit data into through the
URL, using a get request.  That is, they would go to something like
http://localhost:3000/links/new?url=http://www.google.com and
http://www.google.com would be submitted.

Right now my controller looks like:

<% form_for @link, :method => :get do |f| %>
  <%= f.error_messages %>
  <p>
    <%= f.label :url %><br />
    <%= f.text_field :url %>
  </p>
  <p>
    <%= f.submit 'Create' %>
  </p>
<% end %>

Currently, going to that address doesn't do anything in the browser and
this gets output in the terminal: "Processing LinksController#new (for
127.0.0.1 at 2009-04-25 11:36:26) [GET]
  Parameters: {"url"=>"http://www.google.com"}";

Putting "http://www.google.com"; in the actual textfield and hitting the
submit button gets this output: "  Parameters: {"commit"=>"Create",
"authenticity_token"=>"nii2AAhoBYGSYW3ggw1Ul8ENZJLMRR6mJg2AfBWdloQ=",
"link"=>{"url"=>"http://www.google.com"}}";.

Can anyone let me know what I'm doing wrong?  Thanks in advance.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to