Skip to content

Instantly share code, notes, and snippets.

@dzsodzso63
Created March 18, 2011 19:49
Show Gist options
  • Save dzsodzso63/876718 to your computer and use it in GitHub Desktop.
Save dzsodzso63/876718 to your computer and use it in GitHub Desktop.
controller1 doesn't render the application layout, but controller2 does!
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryProtection for details
def initialize
@messages = {}
end
private
def redirect_to_ssl
redirect_to :protocol => "https://" unless (request.ssl? || request.local?)
end
def render404
render_err(404)
end
end
class MemesController < ApplicationController
def browse
end
end
class MemesController < ApplicationController
def browse
render :layout => "application"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment