Quantcast
Channel: Pragmatic Forums | Posts in topic 'Form_for doesn't create param in 2.3.2'
Viewing all articles
Browse latest Browse all 20

Form_for doesn't create param in 2.3.2 posted by Peter Shearan @ Mon, 18 May 2009 12:41:45 +0000

$
0
0

I’ve worked thru the example in Chapter 21. Resource-Based Routing to create articles and associated comments.

The code for creating a new comment uses a form created using form_for:

<% form_for :comment, :url => comments_url, :article_id => @article_id do |form| %>

<—snip ->

<% end %>

In 2.3.2, this fails on creation as the before_filter :find_article looks for a params[:article_id] but cannot find it. The param should have been created by :article_id => @article_id in the form_for declaration.

I built the same simple system on 1.2.6 and it works just fine!!

I’ve looked at the API and on forums and this should work but I can’t get it to create any params in the form_for declaration. Is this a bug or has something changed in 2.3.2.

Regards

Peter


Viewing all articles
Browse latest Browse all 20

Trending Articles