I tried
ActiveRecord::Base.connection.execute("DESCRIBE TABLE table_name")
and I was told to check my SQL manual. Having done this, I found that
ActiveRecord::Base.connection.execute("DESCRIBE table_name").each{|r| p r }
worked. Put any actual logic in the block.
source
share