Skip to content

Instantly share code, notes, and snippets.

@zacksiri
Created August 8, 2012 05:12
Show Gist options
  • Save zacksiri/3292307 to your computer and use it in GitHub Desktop.
Save zacksiri/3292307 to your computer and use it in GitHub Desktop.
class ApiController < ActionController::Metal
include ActionController::Helpers
include ActionController::Redirecting
include ActionController::Rendering
include ActionController::Renderers::All
include ActionController::ConditionalGet
include ActionController::MimeResponds
include ActionController::RequestForgeryProtection
include ActionController::ForceSSL
include AbstractController::Callbacks
include ActionController::Instrumentation
include ActionController::ParamsWrapper
include ActionController::Rescue
include Devise::Controllers::Helpers
include Rails.application.routes.url_helpers
append_view_path "#{Rails.root}/app/views"
end
class Api::SearchController < ApiController
before_filter :authenticate_user!
respond_to :json
def index
respond_with @search = UniversalSearch.search(params, current_account.id)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment