Last active
December 11, 2015 01:29
-
-
Save pjambet/4524078 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
# Create new comment | |
Comment.create( :author => "sacha", :message => "toto", :recipe => r) | |
# Ya plus simple | |
r.comments.create author: 'sacha', message: 'toto' | |
# Normalement ca devrait pas poser de problemes de mass assignment ca | |
def get_name_for_user user | |
user | |
end | |
r.comments.create author: get_name_for_user('sacha'), message: 'toto' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment