{"action":"created","issue":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/182","labels_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/182/labels{/name}","comments_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/182/comments","events_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/182/events","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/182","id":60967700,"number":182,"title":"undefined method `authenticate_user!'","user":{"login":"acmitch","id":4482055,"avatar_url":"https://avatars.githubusercontent.com/u/4482055?v=3","gravatar_id":"","url":"https://api.github.com/users/acmitch","html_url":"https://github.com/acmitch","followers_url":"https://api.github.com/users/acmitch/followers","following_url":"https://api.github.com/users/acmitch/following{/other_user}","gists_url":"https://api.github.com/users/acmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/acmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acmitch/subscriptions","organizations_url":"https://api.github.com/users/acmitch/orgs","repos_url":"https://api.github.com/users/acmitch/repos","events_url":"https://api.github.com/users/acmitch/events{/privacy}","received_events_url":"https://api.github.com/users/acmitch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-03-13T02:51:39Z","updated_at":"2015-03-13T04:09:17Z","closed_at":"2015-03-13T03:31:56Z","body":"Using the **rails-api** gem along with **versionist**. First time using this gem, hoping this is a simple fix on my end. Any suggestions or ideas?\r\n\r\n```ruby\r\nclass ApplicationController < ActionController::API\r\n\tinclude ActionController::Serialization\r\n\tinclude DeviseTokenAuth::Concerns::SetUserByToken\r\n\tbefore_action :configure_permitted_parameters, if: :devise_controller?\r\n\r\n\t  def configure_permitted_parameters\r\n\t    devise_parameter_sanitizer.for(:sign_up) << :username\r\n\t    devise_parameter_sanitizer.for(:sign_up) << :mobile\r\n\t  end\r\n end\r\n```\r\n```ruby\r\nclass V1::UsersController < ApplicationController\r\n\tbefore_action :authenticate_user!, only: [:show]\r\n\r\n\tdef show\r\n\t\tuser = User.find_by_username(params[:username]) if params[:username].present?\r\n\t\tuser = User.find_by_email(params[:email]) if params[:email].present?\r\n\t\tif user.present?\r\n\t\t\trender json: user, status: 200\r\n\t\telse\r\n\t\t\trender :json => { :error => \"bad_request\" }, :status => 400\r\n\t\tend\r\n\tend\r\nend\r\n```\r\n\r\n```ruby\r\nclass User < ActiveRecord::Base\r\n\tinclude DeviseTokenAuth::Concerns::User\r\n  \t# Include default devise modules.\r\n  \tdevise :database_authenticatable, :registerable,\r\n        \t:recoverable, :rememberable, :trackable, :validatable,\r\n          \t:confirmable\r\nend\r\n```\r\n\r\n![screen shot 2015-03-12 at 9 46 35 pm](https://cloud.githubusercontent.com/assets/4482055/6632276/849ebe90-c901-11e4-87b4-e156b75872d4.jpg)\r\n"},"comment":{"url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/comments/78788053","html_url":"https://github.com/lynndylanhurley/devise_token_auth/issues/182#issuecomment-78788053","issue_url":"https://api.github.com/repos/lynndylanhurley/devise_token_auth/issues/182","id":78788053,"user":{"login":"acmitch","id":4482055,"avatar_url":"https://avatars.githubusercontent.com/u/4482055?v=3","gravatar_id":"","url":"https://api.github.com/users/acmitch","html_url":"https://github.com/acmitch","followers_url":"https://api.github.com/users/acmitch/followers","following_url":"https://api.github.com/users/acmitch/following{/other_user}","gists_url":"https://api.github.com/users/acmitch/gists{/gist_id}","starred_url":"https://api.github.com/users/acmitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acmitch/subscriptions","organizations_url":"https://api.github.com/users/acmitch/orgs","repos_url":"https://api.github.com/users/acmitch/repos","events_url":"https://api.github.com/users/acmitch/events{/privacy}","received_events_url":"https://api.github.com/users/acmitch/received_events","type":"User","site_admin":false},"created_at":"2015-03-13T04:09:17Z","updated_at":"2015-03-13T04:09:17Z","body":"Yep using [versionist](https://github.com/bploetz/versionist), the ```api_version``` method is defined from that gem and used to version the api.\r\n\r\nProbably not a high priority, but the only issue I can think of is that, someone might run into issues if needing to override the devise_token_auth controllers, while having differences between the api versions: \r\n\r\n```\r\n mount_devise_token_auth_for 'User', at: 'v1/auth', controllers: {\r\n    token_validations:  'overrides/v1/token_validations'\r\n  } \r\nmount_devise_token_auth_for 'User', at: 'v2/auth', controllers: {\r\n    token_validations:  'overrides/v2/token_validations'\r\n  } \r\n```\r\n\r\n"}}