I have an API controller that does not inherit from Application controller. I'm trying to include the respond_to method and get a method undefined error....So then I required actionpack at the top like below:
require 'actionpack'
class Api::V1::UsersController < Api::ApiController
version 1
doorkeeper_for :all
respond_to :json
def show
respond_with current_user.as_json(except: :password_digest)
end
end
and I got the following:
LoadError (cannot load such file -- actionpack): app/controllers/api/v1/users_controller.rb:1:in `'
I already have gem 'actionpack' in my Gemfile as well as Rails 4.1.2 (this is part of a Rails 4 application)
bah, I just realized I didn't add the underscore as in: