Rails 1.2.2 link_to question

This didn’t get answered before, I’m not quite sure if the silence is
telling me that I’m an idiot and it should be obvious, or if the
silence indicates that no one knows why a simple thing shouldn’t work.

I’ve tried this on a linux Centos install, and now my mac. I get the
same result.

In my view I have
<%= link_to “New #{@item_class}”, {:action =>
‘new’, :item_class=>@item_class} %>

which shows up as in the html source:

New Photo

note that the extra “item_class” is not getting added, such as

/item/new?item_class=Photo

which is what 1.1.6 did.

Note that I added the brackets to create a hash for 1.2.2, previously
in 1.1.6 I had

<%= link_to “New #{@item_class}”, :action =>
‘new’, :item_class=>@item_class %>

which worked.

Any guidance appreciated.

On Feb 24, 2007, at 5:29 AM, Joe wrote:

/item/new?item_class=Photo

which is what 1.1.6 did.

Note that I added the brackets to create a hash for 1.2.2, previously
in 1.1.6 I had

<%= link_to “New #{@item_class}”, :action =>
‘new’, :item_class=>@item_class %>

which worked.

It still works that way. The extra parameter does not show up if its
value is nil.

– fxn