Commit 10ea7539 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Remove token_field_name method from base class

parent 444062d9
......@@ -65,9 +65,5 @@ module TokenAuthenticatableStrategies
def token_set?(instance)
raise NotImplementedError
end
def token_field_name
@token_field
end
end
end
......@@ -38,10 +38,10 @@ module TokenAuthenticatableStrategies
end
def token_set?(instance)
token_digest = instance.read_attribute(token_field_name)
token_digest ||= instance.read_attribute(@token_field) if @options[:fallback]
raw_token = instance.read_attribute(token_field_name)
raw_token ||= instance.read_attribute(@token_field) if @options[:fallback]
token_digest.present?
raw_token.present?
end
def token_field_name
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment