Skip to content

Commit

Permalink
fixed pesky HAML indent in 'navigation' recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielKehoe committed Sep 9, 2011
1 parent 52250b0 commit 08a7b1e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.textile
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
h1. CHANGELOG

h2. 1.0.19 September 9, 2011

* fixed pesky HAML indent in 'navigation' recipe

h2. 1.0.18 September 9, 2011

* remove 'devise_navigation' recipe and merge with 'navigation' recipe
Expand Down
23 changes: 11 additions & 12 deletions recipes/navigation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,27 @@
if recipes.include? 'haml'
# There is Haml code in this script. Changing the indentation is perilous between HAMLs.
inject_into_file 'app/views/layouts/application.html.haml', :after => "%header\n" do <<-HAML
%nav
%ul.hmenu
= render 'shared/navigation'
%nav
%ul.hmenu
= render 'shared/navigation'
HAML
end
else
inject_into_file 'app/views/layouts/application.html.erb', :after => "<header>\n" do
<<-ERB
<nav>
<ul class="hmenu">
<%= render 'shared/navigation' %>
</ul>
</nav>
inject_into_file 'app/views/layouts/application.html.erb', :after => "<header>\n" do <<-ERB
<nav>
<ul class="hmenu">
<%= render 'shared/navigation' %>
</ul>
</nav>
ERB
end
end
else
if recipes.include? 'haml'
# There is Haml code in this script. Changing the indentation is perilous between HAMLs.
inject_into_file 'app/views/layouts/application.html.haml', :after => "%body\n" do <<-HAML
%ul.hmenu
= render 'shared/navigation'
%ul.hmenu
= render 'shared/navigation'
HAML
end
else
Expand Down

0 comments on commit 08a7b1e

Please sign in to comment.