Last active
December 25, 2015 14:39
-
-
Save romulostorel/6992830 to your computer and use it in GitHub Desktop.
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
class AcademicRecordReport < Report | |
cattr_acessor :current_user_id | |
protected | |
def current_user | |
User.find(current_user_id) | |
end | |
def validation | |
if current_user.has_permission... | |
end | |
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
class ReportController < Report::BaseController | |
around_filter :set_current_user_id | |
protected | |
def set_current_user_id | |
AcademicRecordReport.current_user_id = current_user.id | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment