Skip to content

Instantly share code, notes, and snippets.

@begin29
Created December 1, 2016 11:00
Show Gist options
  • Save begin29/6dfd3664a3f881069e8db735c9d376e4 to your computer and use it in GitHub Desktop.
Save begin29/6dfd3664a3f881069e8db735c9d376e4 to your computer and use it in GitHub Desktop.
active record useful commands
# 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