Created
December 1, 2016 11:00
-
-
Save begin29/6dfd3664a3f881069e8db735c9d376e4 to your computer and use it in GitHub Desktop.
active record useful commands
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
# check if column exist | |
ActiveRecord::Base.connection.column_exists?(:table_name, :column_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment