James Byrne wrote:
On Jul 7, 3:12�pm, James Byrne <[email protected]>
>
> Presuming that you actually meant the closing ) to be a } I had already
> tried that. This is what happens:
>
>
> <%=link_to('link here',
> { new_object_path,
> :method => :post,
> :confirm => "Press OK"},
> :id => "css_id")
> %>
>
>
But we were sooooo close. The actual code has to be this:
<%=link_to('link here',
{ new_object_path,
{ :method => :post, # note hash within block
:confirm => "Press OK"
}
},
:id => "css_id")
%>
Obscure does not do this sort of thing justice.
--
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
-~----------~----~----~----~------~----~------~--~---