Why doesn''t this output class="delete" into my html?
<%= link_to_remote image_tag("delete"), :update =>
"relationship_" +
@relationship.id.to_s, :url => { :controller => "relationships",
:action
=> "destroy", :id => @relationship.id }, :html_options =>
{:class =>
"delete"} %>
Regards,
Ben
Hi Ben,
try using ''... :html_options => {"class" =>
"delete} ...'' instead ;)
.b
Am 25.03.2005 um 00:33 schrieb Ben Nolan:
> Why doesn''t this output class="delete" into my html?
>
> <%= link_to_remote image_tag("delete"), :update =>
"relationship_" +
> @relationship.id.to_s, :url => { :controller =>
"relationships",
> :action => "destroy", :id => @relationship.id },
:html_options =>
> {:class => "delete"} %>
>
> Regards,
> Ben
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
Ouh, typo ...
''... :html_options => {"class" => "delete"}
...''
sorry!
.b
Am 25.03.2005 um 00:45 schrieb Bjoern Wolf:
> Hi Ben,
>
> try using ''... :html_options => {"class" =>
"delete} ...'' instead ;)
>
> .b
>
> Am 25.03.2005 um 00:33 schrieb Ben Nolan:
>
>> Why doesn''t this output class="delete" into my html?
>>
>> <%= link_to_remote image_tag("delete"), :update =>
"relationship_" +
>> @relationship.id.to_s, :url => { :controller =>
"relationships",
>> :action => "destroy", :id => @relationship.id },
:html_options =>
>> {:class => "delete"} %>
>>
>> Regards,
>> Ben
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
Hmm - that doesn''t seem to work either!
<%= link_to_remote image_tag("delete"), :html_options =>
{"style" =>
"delete"}, :update => "relationship_" +
@relationship.id.to_s, :url => {
:controller => "relationship", :action => "destroy",
:id =>
@relationship.id }%>
:(
Ben
Bjoern Wolf wrote:
> Ouh, typo ...
>
> ''... :html_options => {"class" =>
"delete"} ...''
>
> sorry!
>
> .b
>
> Am 25.03.2005 um 00:45 schrieb Bjoern Wolf:
>
>> Hi Ben,
>>
>> try using ''... :html_options => {"class" =>
"delete} ...'' instead ;)
>>
>> .b
>>
>> Am 25.03.2005 um 00:33 schrieb Ben Nolan:
>>
>>> Why doesn''t this output class="delete" into my
html?
>>>
>>> <%= link_to_remote image_tag("delete"), :update =>
"relationship_" +
>>> @relationship.id.to_s, :url => { :controller =>
"relationships",
>>> :action => "destroy", :id => @relationship.id },
:html_options =>
>>> {:class => "delete"} %>
>>>
>>> Regards,
>>> Ben
>>> _______________________________________________
>>> Rails mailing list
>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>>
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
Ben-
According to:
http://rails.rubyonrails.org/classes/ActionView/Helpers/JavascriptHelper.html#M000324
You may want to try something more like:
<%= link_to_remote image_tag("delete"), { :update =>
"relationship_" +
@relationship.id.to_s, :url => {
:controller => "relationship", :action => "destroy",
:id =>
@relationship.id } }, { :class =>
"delete" } %>
Provided I have all my curly brackets in the right place...
On Fri, 25 Mar 2005 11:59:29 +1200, Ben Nolan
<ben-tH0n/LiDeu9BWQWeTLFoew@public.gmane.org>
wrote:> Hmm - that doesn''t seem to work either!
>
> <%= link_to_remote image_tag("delete"), :html_options =>
{"style" =>
> "delete"}, :update => "relationship_" +
@relationship.id.to_s, :url => {
> :controller => "relationship", :action =>
"destroy", :id =>
> @relationship.id }%>
>
> :(
>
> Ben
> Bjoern Wolf wrote:
>
> > Ouh, typo ...
> >
> > ''... :html_options => {"class" =>
"delete"} ...''
> >
> > sorry!
> >
> > .b
> >
> > Am 25.03.2005 um 00:45 schrieb Bjoern Wolf:
> >
> >> Hi Ben,
> >>
> >> try using ''... :html_options => {"class"
=> "delete} ...'' instead ;)
> >>
> >> .b
> >>
> >> Am 25.03.2005 um 00:33 schrieb Ben Nolan:
> >>
> >>> Why doesn''t this output class="delete" into
my html?
> >>>
> >>> <%= link_to_remote image_tag("delete"), :update
=> "relationship_" +
> >>> @relationship.id.to_s, :url => { :controller =>
"relationships",
> >>> :action => "destroy", :id => @relationship.id
}, :html_options =>
> >>> {:class => "delete"} %>
> >>>
> >>> Regards,
> >>> Ben
> >>> _______________________________________________
> >>> Rails mailing list
> >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> >>> http://lists.rubyonrails.org/mailman/listinfo/rails
> >>
> >>
> >> _______________________________________________
> >> Rails mailing list
> >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> >> http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> >
> > _______________________________________________
> > Rails mailing list
> > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> >
> >
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
Hey Ben,
now you are writing an attribute "style" with the content
"delete".
that doesnt make sense to me ;) Try following instead:
<%= link_to_remote(image_tag("delete"),
{:url => {:controller => "relationship", :action
=>
"destroy", :id => @relationship.id}, :update =>
"relationship_" +
@relationship.id.to_s},
{:class => "delete"}) %>
.b
Am 25.03.2005 um 00:59 schrieb Ben Nolan:
> Hmm - that doesn''t seem to work either!
>
> <%= link_to_remote image_tag("delete"), :html_options =>
{"style" =>
> "delete"}, :update => "relationship_" +
@relationship.id.to_s, :url =>
> { :controller => "relationship", :action =>
"destroy", :id =>
> @relationship.id }%>
>
> :(
>
> Ben
> Bjoern Wolf wrote:
>
>> Ouh, typo ...
>>
>> ''... :html_options => {"class" =>
"delete"} ...''
>>
>> sorry!
>>
>> .b
>>
>> Am 25.03.2005 um 00:45 schrieb Bjoern Wolf:
>>
>>> Hi Ben,
>>>
>>> try using ''... :html_options => {"class"
=> "delete} ...'' instead ;)
>>>
>>> .b
>>>
>>> Am 25.03.2005 um 00:33 schrieb Ben Nolan:
>>>
>>>> Why doesn''t this output class="delete" into
my html?
>>>>
>>>> <%= link_to_remote image_tag("delete"), :update
=> "relationship_"
>>>> + @relationship.id.to_s, :url => { :controller =>
"relationships",
>>>> :action => "destroy", :id => @relationship.id
}, :html_options =>
>>>> {:class => "delete"} %>
>>>>
>>>> Regards,
>>>> Ben
>>>> _______________________________________________
>>>> Rails mailing list
>>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>>>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>>
>>>
>>> _______________________________________________
>>> Rails mailing list
>>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>>
>> _______________________________________________
>> Rails mailing list
>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>>
>>
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails