Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
heroku was causing problems because I needed to change the db schema
- Loading branch information
1 parent
ff7edc6
commit 716c6b9
Showing
15 changed files
with
64 additions
and
46 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
class User < ActiveRecord::Base | ||
acts_as_authentic | ||
acts_as_authentic do |config| | ||
config.validate_email_field = false | ||
config.validate_login_field = false | ||
config.validate_password_field = false | ||
end | ||
|
||
include Profile | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
%h2 Confirm | ||
%form.authentication_form{:action => signup_url, :method => :post} | ||
%fieldset | ||
/ authentication_type should be "user" or "session", based on controller | ||
- transfer = case session[:auth_method] | ||
- when "oauth" | ||
- %w(_key _token _secret auth_method oauth_provider) | ||
- when "openid" | ||
- %w(auth_method openid_identifier) | ||
- transfer.each do |hidden| | ||
%input{:type => :hidden, :name => hidden.to_sym, :value => session[hidden.to_sym]} | ||
%input{:type => :hidden, :name => :authentication_type, :value => :user} | ||
%input{:type => :text, :name => "user[email]"} | ||
%input.submit{:name => :submit, :type => :submit, :value => "Register"}/ |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
%h2 Login! | ||
%form#authentication_form{:action => authenticate_url, :method => :post} | ||
- form_for @user_session, :url => authenticate_path, :html => { :method => :post, :class => "authentication_form" } do |f| | ||
= f.error_messages | ||
/ authentication_type should be "user" or "session", based on controller | ||
= oauth_login_hidden_input | ||
%fieldset | ||
%input{:type => :hidden, :name => :authentication_method, :value => :oauth} | ||
%input{:type => :hidden, :name => :authentication_type, :value => :session} | ||
%legend Click your Oauth or OpenID provider. | ||
%legend Click your Oauth or OpenID provider | ||
.oauth_providers | ||
%ul | ||
- %w(google facebook twitter).each do |name| | ||
- %w(google facebook twitter yahoo myspace linked_in).each do |name| | ||
%li.oauth_provider | ||
%img{:src => "/images/icons/#{name}.png"} | ||
%input{:type => :radio, :id => "#{name}_oauth_provider", :name => :oauth_provider, :value => name} | ||
= image_tag "/images/icons/#{name}.png" | ||
= radio_button_tag :oauth_provider, name | ||
.clearfix | ||
%fieldset | ||
%legend Or type in your OpenID address | ||
.openid_address | ||
%input.nice{:type => :text, :name => "openid_identifier"} | ||
%input.submit{:name => :submit, :type => :submit, :value => "Register"}/ | ||
= text_field_tag :openid_identifier, nil, :class => :nice | ||
= submit_tag "Login", :class => :submit |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
ActionController::Routing::Routes.draw do |map| | ||
map.connect '/', :controller => :users, :action => :new | ||
map.reset "reset", :controller => :users, :action => :detonate | ||
map.logout 'logout', :controller => :user_sessions, :action => :destroy | ||
|
||
map.login 'login', :controller => :user_sessions, :action => :new | ||
map.logout 'logout', :controller => :user_sessions, :action => :destroy, :conditions => {:method => :get} | ||
map.authenticate 'authenticate', :controller => :user_sessions, :action => :create, :conditions => {:method => :post} | ||
map.signup 'signup', :controller => :users, :action => :new, :as => :signup | ||
map.register 'register', :controller => :users, :action => :create, :conditions => {:method => :post} | ||
map.connected 'connected', :controller => :users, :action => :update, :conditions => {:method => :put} | ||
|
||
map.register 'register', :controller => :users, :action => :new | ||
map.signup 'signup', :controller => :users, :action => :create, :conditions => {:method => :post} | ||
map.connected 'connect', :controller => :users, :action => :update, :conditions => {:method => :put} | ||
|
||
map.resources :users | ||
map.resource :user_session | ||
|
||
map.reset "reset", :controller => :users, :action => :detonate | ||
|
||
map.profile ':id', :controller => :users, :action => :show | ||
|
||
map.root :controller => 'users' | ||
end |
This file contains 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
This file contains 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
This file contains 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
File renamed without changes
This file contains 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
This file contains 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