Config the entity model to a boolean param
dcalixto opened this issue · 0 comments
dcalixto commented
Hello, i'm trying to config the entity model to login if the confirmation_email is set to true,
Everything is working very well beside this detail, as this kind of situation is not on the docs i'd like to know if this is possible with knock.
def self.from_token_request(request)
email = request.params["auth"] && request.params["auth"]["email"]
confirmation_email = request.params["auth"] && request.params["auth"]["confirmation_email"]
self.find_by(email: email, confirmation_email: confirmation_email)
end
So, i've trying to
def self.from_token_request(request)
email = request.params["auth"] && request.params["auth"]["email"]
confirmation_email = request.params["auth"] && request.params["auth"]["confirmation_email" ]
self.find_by(email: email, confirmation_email: confirmation_email == true)
end
Someone, can clarify about this?