Guest User

Untitled

a guest
Oct 23rd, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. module CabinetsHelper
  2. def component(component)
  3. haml_tag :div, :id => dom_id(component), :class => "component_display " + component.elevation.to_s do
  4. haml_concat component_link_to_function(component)
  5. end
  6. end
  7.  
  8. def component_link_to_function(component)
  9. link_to_function component_image(component), "alert('test')")
  10. #This will have a lot more once I get the test working
  11. end
  12.  
  13. def component_image(component)
  14. image_tag component.image, :id => dom_id(component), :class => "test", :height => component.image_height
  15. end
  16. end
  17.  
  18. # and in your view
  19. - component( @whatever )
Add Comment
Please, Sign In to add comment