Skip to content

Instantly share code, notes, and snippets.

@rubytastic
Created October 5, 2011 16:02
Show Gist options
  • Save rubytastic/1264820 to your computer and use it in GitHub Desktop.
Save rubytastic/1264820 to your computer and use it in GitHub Desktop.
class HomeController < ApplicationController
before_filter :authenticate_user!, :except =>"index"
def index
if user_signed_in?
@user = Profile.find(current_user)
@profiles = Profile.paginate(:page => params[:page])
render :layout => "application"
render :partial => "index_home"
else
render :layout => "hero"
render :partial => "index_hero"
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment