Created
March 18, 2011 19:49
-
-
Save dzsodzso63/876718 to your computer and use it in GitHub Desktop.
controller1 doesn't render the application layout, but controller2 does!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MemesController < ApplicationController | |
def browse | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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