We Recommend

The Rails Way The Rails Way
Now, for the first time, there’s a comprehensive, authoritative guide to building production-quality software with Rails. Pioneering Rails developer Obie Fernandez and a team of experts illuminate the entire Rails API, along with the Ruby idioms, design approaches, libraries, and plug-ins that make Rails so valuable.


Posted By

brettarogers on 12/05/07


Tagged

textmate rails applicationhelper


Versions (?)


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.