Last active
August 29, 2015 14:20
-
-
Save coalwater/d1255c8b264c9b1974d8 to your computer and use it in GitHub Desktop.
rails console tips
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
bin/rails c --sandbox | |
User.destroy_all | |
exit |
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
User.where(login_count: 0) | |
users = _ |
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
User.find(1) | |
_.name |
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
@user = User.first | |
helper.link_to(@user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment