Last active
December 11, 2015 08:49
-
-
Save telagraphic/4575930 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
def new | |
@current_account = signed_in_user.accounts.find(params[:account_id]) | |
@new_credit = Credit.new | |
@new_credit.account_id = @current_account.id | |
end | |
:account_id is an attribute of the credits resource, so why use it to find an account record, why not just :id? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment