Posted By

brettarogers on 12/05/07


Tagged

textmate rails applicationhelper


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

endorfin
webstic


Application Helper Starter


 / Published in: Rails
 

  1. def include_javascript( js_file )
  2. content_for( :javascripts ){ javascript_include_tag js_file }
  3. end
  4.  
  5. def include_stylesheet( css_file )
  6. content_for( :stylesheets ){ stylesheet_link_tag css_file }
  7. end
  8.  
  9. def add_body_id( id )
  10. content_for( :body_id ){ id }
  11. end
  12.  
  13. def heading( page_title )
  14. content_for( :heading ){ page_title }
  15. end
  16.  
  17. def class_name
  18. cycle "odd", "even"
  19. end

Report this snippet  

You need to login to post a comment.