lib/sexy_buttons/view_helpers.rb
# Returens styled <tt>a</tt> tag
#
# themes are selected similar to sexy_button method
# 
#   sexy_link_to "Click here", "/my_url", :theme => "my-theme"
Returens styled a tag
themes are selected similar to sexy_button method


Returens styled a tag themes are selected similar to sexy_button method
def sexy_link_to(name, options={}, html_options={})
      default_html_options = {
        :class => "sexy-button"
      }
      if html_options[:theme] or SexyButtons.default_theme != "default"
        theme = html_options[:theme] ? html_options.delete(:theme) : SexyButtons.default_theme
        default_html_options[:class] << " sexy-button-#{theme}"
      end
      if html_options[:class]
        html_options[:class] << " #{default_html_options[:class]}"
      end
      link_to(content_tag(:span, name), options, default_html_options.merge(html_options))
    end
def sexy_link_to ( name , options = { } , html_options = { } ) default_html_options = { :class => "sexy-button" } if html_options [ :theme ] or SexyButtons . default_theme != "default" theme = html_options [ :theme ] ? html_options . delete ( :theme ) : SexyButtons . default_theme default_html_options [ :class ] << " sexy-button-#{theme}" end if html_options [ :class ] html_options [ :class ] << " #{default_html_options[:class]}" end link_to ( content_tag ( :span , name ) , options , default_html_options . merge ( html_options ) ) end
Returens styled <tt>a</tt> tag
themes are selected similar to sexy_button method
Returens styled <tt > a< / tt > tag themes are selected similar to sexy_button method
name
<not_specific>
options
<not_specific>
html_options
<not_specific>