Forum: Ruby on Rails css, div-tags and ajax

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Claus G. (Guest)
on 2006-03-29 21:17
(Received via mailing list)

I copied parts of the ajax-examples in Agile Rails prog. and modified
it so it searched for zip-codes. The result is displayed in
search.rhtml. The first version looked like this, I liked the look of
the "add to cart" in the depot-example. :class => 'button1' is
originally addtocart which I renamed in the .css-file.

<% for city in @cities %>
  <%= link_to (city.postalcode,
                           :action => 'observer',
                           :class => 'button1') %>
  <%=h %>
<% end %>

Fairly trivial.  When I wanted to "ajax-ify" link_to I wrote:

<% for city in @cities %>
  <%= link_to_remote (city.postalcode,
                                        :update => 'p_search',
                                        :url => {:action => 'observer'},
                                        :class => 'button1') %>
  <%=h %>
<% end %>

Now this nice css-button1 looks like a plain href. How can I retain
the css-created look?

This topic is locked and can not be replied to.