Nicholas Henry wrote:
> Based on the documentation:
> 
> link_to(name, options = {}, html_options = nil)
> 
> I would expect this is what you are looking for (note haven't tested
> it):
> 
> link_to "link here", {new_object_path,
>                     :method => :post, :confirm => 'Press OK'), #url
> options
>                     :class => "css_class", :id => "css_id"    #html
> options
> 
> HTH,
> Nicholas
> 
> 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")
%>


compile error
index.html.erb:86: syntax error
          :method    =>  :post,
                       ^
index.html.erb:87: syntax error
          :confirm   =>  "Press OK"},

index.html.erb:89: syntax error
).to_s); @output_buffer.concat "\n"
                                   ^

-- 
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