Created
May 27, 2014 16:27
-
-
Save bartimaeus/6ae4a400b3d9dd9f86d1 to your computer and use it in GitHub Desktop.
Basic API Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Api::ApplicationController < ActionController::Metal | |
include ActionView::Layouts | |
include ActionController::Helpers | |
include ActionController::Rescue | |
include ActionController::Redirecting | |
include AbstractController::Rendering | |
include ActionController::Renderers::All | |
include ActionController::ImplicitRender | |
include ActionController::MimeResponds | |
include ActionController::ConditionalGet | |
include AbstractController::Callbacks | |
include ActionController::StrongParameters | |
include ActionController::Caching | |
include Rails.application.routes.url_helpers | |
respond_to :json | |
rescue_from NoMethodError, with: :no_method | |
rescue_from StandardError, with: :standard_error | |
rescue_from ActiveRecord::RecordNotFound, with: :record_not_found | |
rescue_from ActionView::MissingTemplate, with: :missing_template | |
append_view_path "#{Rails.root}/app/views" | |
# ... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment