Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customization of ajax request in devise authenticator. #886

Merged

Conversation

kbullaughey
Copy link
Contributor

Allow makeRequest to be overridden to provide a second parameter that gets merge into .ajax() config argument. Here's an example of how this could be used to have devise with a json body instead of request parameters:

export default DeviseAuthenticator.extend({
  makeRequest: function(data) {
    if (typeof(data) === "object") {
      data = JSON.stringify(data);
    }
    return this._super(data, {contentType: 'application/json'});
  }
});

@marcoow marcoow added this to the 1.1 milestone Feb 4, 2016
marcoow added a commit that referenced this pull request Feb 4, 2016
…-devise

Allow customization of ajax request in devise authenticator.
@marcoow marcoow merged commit 93a1a18 into mainmatter:master Feb 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants