Skip to content
Browse files

Add link to License on Readme

  • Loading branch information...
1 parent d86d3de commit 88e056b658a7c835282fe981845f543239547d59 @coreyhaines committed
Showing with 6 additions and 5 deletions.
  1. +6 −5 README.md
View
11 README.md
@@ -2,7 +2,7 @@ has_tokens
==========
Creates tokens for accessing ActiveRecord objects. Allows you to declaratively specify token-based access for your ActiveRecord objects.
-
+
Under the covers, has_tokens uses SecureRandom.hex so they'll be all "c07a2". The size is configurable, so if you need trillions, you can make that happen, man.
Install
@@ -23,14 +23,14 @@ Active Record Implementation
class YourSuperActiveRecordClass < ActiveRecord::Base
HasTokens.on self
has_tokens public: 5
-
+
before_validation :generate_tokens, on: :create
validates_uniqueness_of :public_token
-
+
def self.for_token(token)
find_by_public_token!(token)
end
-
+
def to_param
public_token
end
@@ -66,4 +66,5 @@ coreyhaines and josh cheek
License
-------
-Assume all rights Corey Haines until further notice.
+
+[Please see License.txt](https://github.com/coreyhaines/has_tokens/blob/master/License.txt)

0 comments on commit 88e056b

Please sign in to comment.
Something went wrong with that request. Please try again.