Created
July 20, 2014 16:42
-
-
Save thanhcuong1990/e8285e9de39f53f20c3f to your computer and use it in GitHub Desktop.
Scope example 6
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
# /app/controllers/posts_controller.rb | |
p = Post.new | |
p.title = "This is the title" | |
p.content = "This is the content of post" | |
p.user = current_user | |
p.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment