lib/generators/layout/navigation/navigation_generator.rb in rails_layout-1.0.5 vs lib/generators/layout/navigation/navigation_generator.rb in rails_layout-1.0.6
- old
+ new
@@ -45,9 +45,20 @@
<li><%= link_to 'Users', users_path %></li>
<% end %>
LINKS
end
end
+ # OMNIAUTH
+ if Dir.glob("config/initializers/omniauth.rb").any?
+ append_file 'app/views/layouts/_navigation_links.html.erb' do <<-LINKS
+<% if user_signed_in? %>
+ <li><%= link_to 'Logout', signout_path %></li>
+<% else %>
+ <li><%= link_to 'Login', signin_path %></li>
+<% end %>
+LINKS
+ end
+ end
end
end
end
end