Created
October 26, 2011 13:45
-
-
Save jkamenik/1316395 to your computer and use it in GitHub Desktop.
Cancan
This file contains hidden or 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
def super_user | |
can :see_user, Ticket | |
end |
This file contains hidden or 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
def index | |
search = { :page => params[:page] } | |
search[:include] = :user if can? :see_user, Ticket | |
@tickets = @tickets.where(conditions).order('created_at desc').search(params[:search],search) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment