Permalink
Browse files

Adding some stuff for working with Rails.

  • Loading branch information...
jeremyboles committed Jan 29, 2013
1 parent 9055d9c commit 2c8ae80ee57dc8b462a1a6942e857b55412b8ed0
Showing with 10 additions and 1 deletion.
  1. +9 −0 lib/snapshot/token.rb
  2. +1 −1 lib/snapshot/version.rb
View
@@ -15,5 +15,14 @@ def self.create
def to_s
token
end
+
+ # Allow the Token object to be serialized by Rails.
+ if defined?(ActiveModel::Serialization)
+ include ActiveModel::Serialization
+
+ def attributes
+ { expires_in: expires_in, token: token }
+ end
+ end
end
end
View
@@ -1,3 +1,3 @@
module Snapshot
- VERSION = '0.3.0'
+ VERSION = '0.3.2'
end

0 comments on commit 2c8ae80

Please sign in to comment.