Last active
December 10, 2015 22:08
-
-
Save manusajith/4500141 to your computer and use it in GitHub Desktop.
Ruby and Ruby on Rails Tips for beginers
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
=begin | |
Rails' index_by: the easy way to convert an Array to a Hash. | |
=end | |
Post.all.index_by(&:title) | |
=begin | |
If u r nt sure wat files a Rails generator wud create for u jst add -p for a dry run | |
=end | |
rails g model Blog -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment