Skip to content

Commit

Permalink
added class to body and main_navigation links
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityblast committed Feb 12, 2009
1 parent 3b11fe4 commit 20a055b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rails_generators/theme/templates/view_layout.html.erb
Expand Up @@ -5,7 +5,7 @@
<title>Web App Theme</title>
<%%= stylesheet_link_tag 'web_app_theme', "themes/<%= options[:theme] %>/style" %>
</head>
<body>
<body class="<%%= controller.controller_path %>">
<div id="container">
<div id="header">
<h1><a href="#">Web App Theme</a></h1>
Expand Down
2 changes: 1 addition & 1 deletion rails_generators/themed/themed_generator.rb
Expand Up @@ -44,7 +44,7 @@ def manifest
if options[:layout]
m.gsub_file(File.join("app/views/layouts", "#{options[:layout]}.html.erb"), /\<div\s+id=\"main-navigation\">.*\<\/ul\>/mi) do |match|
match.gsub!(/\<\/ul\>/, "")
%|#{match} <li><a href="<%= #{plural_resource_name}_path %>">#{plural_model_name}</a></li></ul>|
%|#{match} <li class="<%= controller.controller_path == '#{plural_resource_name}' ? 'active' : '' %>"><a href="<%= #{plural_resource_name}_path %>">#{plural_model_name}</a></li></ul>|
end
end
end
Expand Down

0 comments on commit 20a055b

Please sign in to comment.