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 ...@@ -65,9 +65,5 @@ module TokenAuthenticatableStrategies
def token_set?(instance) def token_set?(instance)
raise NotImplementedError raise NotImplementedError
end end
def token_field_name
@token_field
end
end end
end end
...@@ -38,10 +38,10 @@ module TokenAuthenticatableStrategies ...@@ -38,10 +38,10 @@ module TokenAuthenticatableStrategies
end end
def token_set?(instance) def token_set?(instance)
token_digest = instance.read_attribute(token_field_name) raw_token = instance.read_attribute(token_field_name)
token_digest ||= instance.read_attribute(@token_field) if @options[:fallback] raw_token ||= instance.read_attribute(@token_field) if @options[:fallback]
token_digest.present? raw_token.present?
end end
def token_field_name 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