Created
May 19, 2014 04:29
-
-
Save cacheflow/52a1b2ce5209da6ba7b9 to your computer and use it in GitHub Desktop.
Blogging App
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Blogger</title> | |
<%= stylesheet_link_tag "application" %> | |
<%= javascript_include_tag 'application' %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<ul> | |
<% if !@current_user %> | |
<li> <%=link_to "Sign up", new_authors_path %> </li> | |
<li> <%=link_to "Sign in", new_sessions_path %> </li> | |
<% else %> | |
<li> Logged in as <%= current_author.name %> </li> | |
<li> <%= link_to "Sign Out", sessions_path, :method => :delete %> | |
</li> | |
<%end%> | |
</ul> | |
<p class="flash"><%= flash.notice %></p> | |
<%= yield %> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rails.application.routes.draw do | |
root to: "articles#index" | |
resources :articles do | |
resources :comments | |
end | |
resources :authors | |
resources :tags | |
resource :sessions | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment