Class: Workarea::Admin::ToolbarController

Inherits:
ApplicationController show all
Includes:
Storefront::CurrentCheckout
Defined in:
app/controllers/workarea/admin/toolbar_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model

Methods included from Publishing

#allow_publishing!, #allow_publishing?, #set_publishing_options

Methods included from Visiting

#most_visited

Instance Method Details

#showObject



7
8
9
10
11
12
13
# File 'app/controllers/workarea/admin/toolbar_controller.rb', line 7

def show
  if params[:id].present?
    model = GlobalID::Locator.locate(params[:id])
    @model = wrap_in_view_model(model, view_model_options)
    @content = Content.for(model) if model.is_a?(Contentable)
  end
end