Form_for

      <% form_for :post, :url => { :action => :save_requirement } do

|form|
Requirement Title:<%= form.text_field :title, :value =>
params[:title]
<%= form.submit “Add requirement” %>

This is just a part of my form…when I hit submit, it works great with
IE7, but Firefox 3.0 doesn’t do anything. What solution is there to get
it to work with both of them?

Thanks!

Justin To wrote:

      <% form_for :post, :url => { :action => :save_requirement } do

|form|

Could you inspect the source that generates?

Rails is funny regarding symbols on the right side of a =>

Sometimes it treats them as a shortcut for a string; sometimes not…

Also, is your action a member of the current controller?

After you fix it, be sure to use routes.rb to name your route, and use
that.

What do your functional tests say about your ability to :post to that
action?


Phlip

Hi –

On Wed, 23 Jul 2008, Justin To wrote:

it to work with both of them?
I don’t think that’s really an excerpt from your view template; it’s
missing some %> delimiters, so it wouldn’t work at all.

It’s best to cut-and-paste the real code that you’re asking about, so
that people can try to spot what the problem might be.

David


Rails training from David A. Black and Ruby Power and Light:
Intro to Ruby on Rails July 21-24 Edison, NJ

  • Advancing With Rails August 18-21 Edison, NJ
  • Co-taught by D.A. Black and Erik Kastner
    See http://www.rubypal.com for details and updates!