Ken Collins
2006-Apr-30 00:24 UTC
[Rails] Using a DIV or SPAN for a content_tag (link_to_remote)
I was wondering if there was an easy way to over ride the <a> tag that is used as the content_tag() value when using link_to_remote(), perhaps using a SPAN or DIV. I see follow the chain in the source code and I guess I could write my own helper, but I was wondering if there was a way to do this already? I know already that SPAN''s and DIV''s are not supported onclick containers in IE 6, but it''s habbit for me to use them. Currently I have done something like this which puts an a tag around my SPAN. Feedback? <%= link_to_remote( content_tag("span", "", :class => "cssrulz"), { :url => { :controller => "bla", :action => "destroy", :id => bla.id }, :success => "new Effect.Fade(''bla_# {bla.id}'')" } ) %>