Skip to content

Instantly share code, notes, and snippets.

@zxiest
Created April 1, 2011 15:41
Show Gist options
  • Save zxiest/898360 to your computer and use it in GitHub Desktop.
Save zxiest/898360 to your computer and use it in GitHub Desktop.
class AuthsController < ApplicationController
include AuthsHelper
def helloauth
flash[:error] = session[:hello]
redirect_to root_path
end
end
module AuthsHelper
def test
session[:hello] = "HELLO"
redirect_to auth_hello_path
end
end
class LocationsController < ApplicationController
before_filter :test, :only => [:hello]
def hello
logger.debug "HELLO GOT EXECUTED"
redirect_to root_path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment