Last active
December 21, 2015 00:39
-
-
Save marcgg/6222393 to your computer and use it in GitHub Desktop.
This file contains 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 BankAccountController | |
def admin_index | |
@bbans = Bbans.all | |
end | |
def user_index | |
@bbans_user = current_user.bbans.all | |
end | |
end | |
# View user_index | |
@bbans.each{|b| puts b } | |
-> crash | |
----------------- | |
class BankAccountController | |
expose(:bbans){ Bbans.all } | |
expose(:bbans_user){ Bbans.all } | |
def admin_index | |
end | |
def user_index | |
end | |
end | |
# View user_index | |
bbans.each{|b| puts b } | |
-> works |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment