Skip to content

Commit

Permalink
Fixed Login
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Braun committed Oct 22, 2010
1 parent d6ecdc4 commit 65a337f
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 31 deletions.
4 changes: 2 additions & 2 deletions Gemfile
@@ -1,12 +1,12 @@
source 'http://rubygems.org'

gem 'rails', '3.0.1'
gem 'rails', '3.0.0'

# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'

gem 'sqlite3-ruby', :require => 'sqlite3'
gem "devise"
gem "devise", "1.1.2"

# Use unicorn as the web server
# gem 'unicorn'
Expand Down
54 changes: 27 additions & 27 deletions Gemfile.lock
Expand Up @@ -2,37 +2,37 @@ GEM
remote: http://rubygems.org/
specs:
abstract (1.0.0)
actionmailer (3.0.1)
actionpack (= 3.0.1)
actionmailer (3.0.0)
actionpack (= 3.0.0)
mail (~> 2.2.5)
actionpack (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
actionpack (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
builder (~> 2.1.2)
erubis (~> 2.6.6)
i18n (~> 0.4.1)
rack (~> 1.2.1)
rack-mount (~> 0.6.12)
rack-test (~> 0.5.4)
tzinfo (~> 0.3.23)
activemodel (3.0.1)
activesupport (= 3.0.1)
activemodel (3.0.0)
activesupport (= 3.0.0)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
activerecord (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
arel (~> 1.0.0)
tzinfo (~> 0.3.23)
activeresource (3.0.1)
activemodel (= 3.0.1)
activesupport (= 3.0.1)
activesupport (3.0.1)
activeresource (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
activesupport (3.0.0)
arel (1.0.1)
activesupport (~> 3.0.0)
bcrypt-ruby (2.1.2)
builder (2.1.2)
devise (1.1.3)
devise (1.1.2)
bcrypt-ruby (~> 2.1.2)
warden (~> 0.10.7)
erubis (2.6.6)
Expand All @@ -49,17 +49,17 @@ GEM
rack (>= 1.0.0)
rack-test (0.5.6)
rack (>= 1.0)
rails (3.0.1)
actionmailer (= 3.0.1)
actionpack (= 3.0.1)
activerecord (= 3.0.1)
activeresource (= 3.0.1)
activesupport (= 3.0.1)
rails (3.0.0)
actionmailer (= 3.0.0)
actionpack (= 3.0.0)
activerecord (= 3.0.0)
activeresource (= 3.0.0)
activesupport (= 3.0.0)
bundler (~> 1.0.0)
railties (= 3.0.1)
railties (3.0.1)
actionpack (= 3.0.1)
activesupport (= 3.0.1)
railties (= 3.0.0)
railties (3.0.0)
actionpack (= 3.0.0)
activesupport (= 3.0.0)
rake (>= 0.8.4)
thor (~> 0.14.0)
rake (0.8.7)
Expand All @@ -75,6 +75,6 @@ PLATFORMS
ruby

DEPENDENCIES
devise
rails (= 3.0.1)
devise (= 1.1.2)
rails (= 3.0.0)
sqlite3-ruby
1 change: 1 addition & 0 deletions app/controllers/prefectures_controller.rb
@@ -1,4 +1,5 @@
class PrefecturesController < ApplicationController
before_filter :authenticate_user!, :except => [:index, :show]
# GET /prefectures
# GET /prefectures.xml
def index
Expand Down
9 changes: 8 additions & 1 deletion app/views/layouts/application.html.erb
Expand Up @@ -7,7 +7,14 @@
<%= csrf_meta_tag %>
</head>
<body>

<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
<% if user_signed_in? %>
Hallo, <%= current_user.email %>! <%= link_to "Abmelden", destroy_user_session_path %>
<% else %>
<%= link_to "Anmelden", new_user_session_path %>
<%= link_to "Registrieren", new_user_registration_path %>
<%end %>
<%= yield %>

</body>
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/devise.rb
Expand Up @@ -23,7 +23,7 @@
# config.authentication_keys = [ :email ]

# Tell if authentication through request.params is enabled. True by default.
# config.params_authenticatable = true
config.params_authenticatable = true

# Tell if authentication through HTTP Basic Auth is enabled. True by default.
# config.http_authenticatable = true
Expand Down

0 comments on commit 65a337f

Please sign in to comment.