Skip to content

Instantly share code, notes, and snippets.

@ltackett
Created June 19, 2009 05:28
Show Gist options
  • Save ltackett/132433 to your computer and use it in GitHub Desktop.
Save ltackett/132433 to your computer and use it in GitHub Desktop.
static_shit.haml
----------------
- title "Static Happiness"
%h3 Static Elements
#buttons
%h4.line Buttons, Motherfuton!!
=new_button "primary", 'Add Your Experience', '#'
=button "cancel"
=button "go"
=button "save"
=button "save_changes"
=button "sign_in"
=button "upload"
application_helper.haml
-----------------------
def button(button_name)
render :partial => "/shared/buttons/#{button_name}"
end
def new_button(button_type,button_text,button_href)
render :partial => "/shared/buttons/button"
end
_button.haml
------------
.button{ :class => "#{button_type}-button" }
=link_to button_text, button_hr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment