Skip to content

Commit

Permalink
Added functionality to the application controller to render our no si…
Browse files Browse the repository at this point in the history
…debar layout for all new actions
  • Loading branch information
baphled committed Jun 18, 2010
1 parent e307ebe commit b9a6aad
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/controllers/application_controller.rb
Expand Up @@ -5,6 +5,8 @@ class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryProtection for details

layout :default_or_defined

# Scrub sensitive parameters from your log
# filter_parameter_logging :password

Expand All @@ -13,4 +15,8 @@ def tags
format.json { render :json => @tags }
end
end

def default_or_defined
(action_name == 'new')? 'no_sidebar' : 'application'
end
end

0 comments on commit b9a6aad

Please sign in to comment.