Created
September 16, 2012 14:21
-
-
Save telagraphic/3732608 to your computer and use it in GitHub Desktop.
devise session not applying to each user...
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>Life</title> | |
<%= stylesheet_link_tag "application", :media => "all" %> | |
<%= javascript_include_tag "application" %> | |
<%= csrf_meta_tags %> | |
</head> | |
<body> | |
<% flash.each do |key, value| %> | |
<%= content_tag(:div, value, class: "alert alert-#{key}") %> | |
<% end %> | |
<% if user_signed_in? %> | |
<%= link_to "Sign Out", destroy_user_session_path, :method => :delete %> | |
<%= current_user.email %> | |
<% end %> | |
<%= yield %> | |
<%= debug(params) if Rails.env.development? %> | |
</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
class DaysController < ApplicationController | |
before_filter :authenticate_user! | |
def get_day | |
@day = Day.find(params[:id]) | |
end | |
def index | |
@days = Day.all | |
end | |
...... | |
end |
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
Life::Application.routes.draw do | |
devise_for :users do | |
resources :days | |
end | |
root :to => "Days#index" | |
resources :days do | |
resources :habits | |
end | |
resources :days do | |
resources :feeds | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment