Skip to content

Instantly share code, notes, and snippets.

@shaneriley
Created July 16, 2010 14:37
Show Gist options
  • Save shaneriley/478432 to your computer and use it in GitHub Desktop.
Save shaneriley/478432 to your computer and use it in GitHub Desktop.
class WireframesController < ActionController::Base
public_pages = [:sign_in, :confirm_registration, :homepage, :register, :business_admin_layout]
survey_pages = [:survey_1, :survey_2, :survey_3]
before_filter :admin_layout, :except => public_pages + survey_pages
before_filter :public_layout, :only => public_pages, :except => :business_admin_layout
before_filter :survey_layout, :only => survey_pages
def admin_layout
render :layout => "nuguava_admin"
end
def public_layout
render :layout => "public"
end
def business_admin_layout
render :layout => "business_admin"
end
def survey_layout
render :layout => "survey"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment