lib/token_action/orm/mongoid.rb in token_action-0.0.1 vs lib/token_action/orm/mongoid.rb in token_action-0.0.2
- old
+ new
@@ -8,27 +8,27 @@
include TokenAction::Model
# A shared secret.
# @return [String] a token
- field :token, :type => String
+ field :token, type: String
# The class on which to perform the action.
# @return [String] a class name
# @note `class` clashes with `Object#class` and Mongoid reserves `klass`.
- field :kind, :type => String
+ field :kind, type: String
# Any additional arguments for the action.
# @return [Array] a list of arguments
- field :args, :type => Array
+ field :args, type: Array
# The URL to redirect to after performing the action successfully.
# @return [String] a URL or path
- field :success_url, :type => String
+ field :success_url, type: String
# The URL to redirect to after failing to perform the action.
# @return [String] a URL or path
- field :failure_url, :type => String
+ field :failure_url, type: String
- index({:token => 1}, :unique => true)
+ index({token: 1}, unique: true)
end
end