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
- 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
- #haml_tag outputs directly to the Haml template.
- #Disregard its return value and use the - operator,
- #or use capture_haml to get the value as a String.
Add Comment
Please, Sign In to add comment