Monday, May 14, 2012

link_to blank space

I have changed the regular labels for view, edit and delete for background images for the corresponding <td> labels. But now the link don't work because I don't have text to click.



How can I make blank spaces clickable, or is there another approach to this problem?



This is what I got:



...
<td class="view"><%= link_to '', event %></td>
<td class="edit"><%= link_to ' ', edit_event_path(event) %></td>
<td class="delete"><%= link_to ' ', event, :confirm => 'Are you sure?', :method => :delete %></td>


I know a solution is to add the image as image_tag and create a link, but having the images declared in the style.css is much more cleaner and simple to implement.



thanks in advance





No comments:

Post a Comment