Skip to content

Instantly share code, notes, and snippets.

@thehashrocket
Created January 10, 2017 12:49
Show Gist options
  • Save thehashrocket/6e0642b8c9cc774b05785fefa6d8775b to your computer and use it in GitHub Desktop.
Save thehashrocket/6e0642b8c9cc774b05785fefa6d8775b to your computer and use it in GitHub Desktop.
class PagesController < ApplicationController
before_action :redirect_unless_live, only: [:cars, :trucks, :suvs]
def cars; end
def trucks; end
def suvs; end
home
# ready to go live
end
private
def redirect_unless_live
return unless current_user.beta_access?
redirect_to root_path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment