2014-04-07 09:26:43 +00:00
|
|
|
module Renderer
|
|
|
|
include Rails.application.routes.url_helpers
|
|
|
|
include ActionView::Helpers::UrlHelper
|
2014-04-09 10:30:13 +00:00
|
|
|
include ActionView::RoutingUrlFor
|
2014-04-07 09:26:43 +00:00
|
|
|
include ActionView::Helpers::TagHelper
|
|
|
|
include ActionView::Helpers::RenderingHelper
|
|
|
|
include ActionView::Context
|
|
|
|
include OrbitBasis::RenderAnywhere
|
|
|
|
|
|
|
|
protected
|
2014-05-01 07:14:16 +00:00
|
|
|
def active_for_app_auth?
|
|
|
|
module_app = get_module_app
|
|
|
|
if controller.eql?('admin/module_apps')
|
|
|
|
if module_app.nil?
|
|
|
|
false
|
|
|
|
else
|
|
|
|
module_app.id.to_s == @params[:module_app_id] ? true : false
|
|
|
|
end
|
|
|
|
else
|
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|
2014-04-07 09:26:43 +00:00
|
|
|
|
|
|
|
def request
|
|
|
|
@request
|
|
|
|
end
|
|
|
|
|
|
|
|
def default_url_options
|
|
|
|
_routes.default_url_options
|
|
|
|
end
|
|
|
|
|
|
|
|
def _routes
|
|
|
|
@request.env["action_dispatch.routes"]
|
|
|
|
end
|
|
|
|
|
|
|
|
def controller
|
|
|
|
@params[:controller]
|
|
|
|
end
|
|
|
|
|
|
|
|
def action
|
|
|
|
@params[:action]
|
|
|
|
end
|
|
|
|
|
|
|
|
protected
|
|
|
|
def display?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|