Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module CabinetsHelper
- def component(component)
- haml_tag :div, :id => dom_id(component), :class => "component_display " + component.elevation.to_s do
- haml_concat component_link_to_function(component)
- end
- end
- def component_link_to_function(component)
- link_to_function component_image(component), "alert('test')")
- #This will have a lot more once I get the test working
- end
- def component_image(component)
- image_tag component.image, :id => dom_id(component), :class => "test", :height => component.image_height
- end
- end
- # and in your view
- - component( @whatever )
Add Comment
Please, Sign In to add comment