Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#view_contextObject

Cache to use ‘view_context.content_for` from controller. This hack is nice to hook view_context from a plugin.

Examples

JobsController.before_filter do
  view_context.content_for :jobs_show, "This is a footer."
end


21
22
23
# File 'app/controllers/application_controller.rb', line 21

def view_context
  @view_context ||= super
end