Skip to content

Instantly share code, notes, and snippets.

@docunext
Last active December 15, 2015 11:09
Show Gist options
  • Save docunext/5250709 to your computer and use it in GitHub Desktop.
Save docunext/5250709 to your computer and use it in GitHub Desktop.
require 'active_support/concern'
module MiniController
extend ActiveSupport::Concern
included do
include AbstractController::Layouts
include ActionController::Helpers
include ActionController::UrlFor
include ActionController::Redirecting
include ActionController::Rendering
include ActionController::Renderers::All
include ActionController::ConditionalGet
include ActionController::RackDelegation
include ActionController::MimeResponds
include ActionController::ImplicitRender
include ActionController::StrongParameters
include ActionController::Cookies
include ActionController::RequestForgeryProtection
include AbstractController::Callbacks
include ActionController::Instrumentation
include ActionController::ParamsWrapper
include Rails.application.routes.url_helpers
append_view_path "#{Rails.root}/app/views"
wrap_parameters format: [:json]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment