Skip to content

Commit

Permalink
Update tutorial links
Browse files Browse the repository at this point in the history
  • Loading branch information
binarylogic committed Nov 21, 2008
1 parent 9bd8366 commit 1d9d16d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
6 changes: 4 additions & 2 deletions README.mdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

This is an example of how to use Authlogic in a rails app. Authlogic is an object based authentication solution that handles all of the non sense for you. It's as easy as ActiveRecord is with a database.

This application live: [http://authlogic_example.binarylogic.com](http://authlogic_example.binarylogic.com)
This application live: [http://authlogicexample.binarylogic.com](http://authlogicexample.binarylogic.com)

Quick tutorial on how to build this application here: [http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup](http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup)
Basic setup tutorial: [http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup](http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup)
Reset passwords tutorial: [http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic](http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic)
Open ID tutorial: [http://www.binarylogic.com/2008/11/21/tutorial-using-openid-with-authlogic](http://www.binarylogic.com/2008/11/21/tutorial-using-openid-with-authlogic)

Authlogic: [http://github.com/binarylogic/authlogic](http://github.com/binarylogic/authlogic)

Expand Down
2 changes: 1 addition & 1 deletion app/models/notifier.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class Notifier < ActionMailer::Base
default_url_options[:host] = "authlogic_example.binarylogic.com"
default_url_options[:host] = "authlogicexample.binarylogic.com"

def password_reset_instructions(user)
subject "Password Reset Instructions"
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</head>
<body>

<span style="float: right;"><%= link_to "Source code", "http://github.com/binarylogic/authlogic_example" %> | <%= link_to "Setup tutorial", "http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup" %> | <%= link_to "Password reset tutorial", "http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic" %> | <%= link_to "Authlogic Repo", "http://github.com/binarylogic/authlogic" %> | <%= link_to "Authlogic Doc", "http://authlogic.rubyforge.org/" %></span>
<span style="float: right;"><%= link_to "Source code", "http://github.com/binarylogic/authlogic_example" %> | <%= link_to "Setup tutorial", "http://www.binarylogic.com/2008/11/3/tutorial-authlogic-basic-setup" %> | <%= link_to "Password reset tutorial", "http://www.binarylogic.com/2008/11/16/tutorial-reset-passwords-with-authlogic" %> | <%= link_to "OpenID tutorial", "http://www.binarylogic.com/2008/11/21/tutorial-using-openid-with-authlogic" %> | <%= link_to "Authlogic Repo", "http://github.com/binarylogic/authlogic" %> | <%= link_to "Authlogic Doc", "http://authlogic.rubyforge.org/" %></span>
<h1>Authlogic Example App</h1>
<%= pluralize User.logged_in.count, "user" %> currently logged in<br /> <!-- This based on last_request_at, if they were active < 10 minutes they are logged in -->
<br />
Expand Down
8 changes: 5 additions & 3 deletions db/migrate/20081119233359_add_users_openid_field.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ def self.up

def self.down
remove_column :users, :openid_identifier
change_column :users, :login, :string, :default => "", :null => false
change_column :users, :crypted_password, :string, :default => "", :null => false
change_column :users, :password_salt, :string, :default => "", :null => false

[:login, :crypted_password, :password_salt].each do |field|
User.all(:conditions => "#{field} is NULL").each { |user| user.update_attribute(field, "") if user.send(field).nil? }
change_column :users, field, :string, :default => "", :null => false
end
end
end

0 comments on commit 1d9d16d

Please sign in to comment.