This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
smt (author)
Fri Jan 11 10:38:25 -0800 2008
commit eea8bfee475564f931f827d25c125e64edf2dfc3
tree 8d32060bf4a722b55b61f237fd15a74e7fe5a070
parent 1d9d0516d421aa008f8976ed6a3b0ff5ec37e12b
tree 8d32060bf4a722b55b61f237fd15a74e7fe5a070
parent 1d9d0516d421aa008f8976ed6a3b0ff5ec37e12b
README
ActsAsTokenizable
=================
Add a column named 'token' to your model, as a string:
class AddTokenStringColumnToUsers < ActiveRecord::Migration
def self.up
add_column :users, :token, :string
end
def self.down
remove_column :users, :token
end
end
Then open up your class, and add the following:
class User < ActiveRecord::Base
acts_as_tokenizable
end
Now when a user gets created, he will have a unique 16 character token:
user = User.create!
user.token # => "3737edeca0f85e76"








