Hi Steve,

Acutally, there are no way to do it for submit_tag & button_to, those
helpers should be totally rewritten to suport the markup you need. But
if you are building a modern unobtrusive app, then you don't really
need the functionality of those helpers, so you can just replace them
with a custom helper that just generates the markup you need.

And cusomizing the link_to is quite easy:

def cool_link_to(title, url, options = {})
  options[:class] ||= ''
  options[:class] += ' button'
  link_to(content_tag(:span, title), url, options)
end

<%= cool_link_to "Edit", '/edit/123', :class => 'some-other-class'
%>
# => <a href="/edit/123" class="some-other-class button"><span>Edit</
span></a>

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