Module: ActsAsTokened::FinderMethods
- Defined in:
- app/models/concerns/acts_as_tokened.rb
Instance Method Summary collapse
Instance Method Details
#find(*args) ⇒ Object
28 29 30 31 32 33 34 |
# File 'app/models/concerns/acts_as_tokened.rb', line 28 def find(*args) return super unless args.length == 1 return super if block_given? return find_by_id(args.first) if @_effective_reloading find_by_token(args.first) || raise(::ActiveRecord::RecordNotFound.new("Couldn't find #{name} with 'token'=#{args.first}")) end |