Rails Caching With Query Parameters

Rails Caching With Query Parameters.

Advertisements

rafionrails

Command for listng the table names created for a database:

Executing the below command will return all the table names created for a particular database in array format:

      ActiveRecord::Base.connection.tables

Command for checking whether particular table is created or not in database:

By passing the table name to the below command, we can identify whether that table is created or not?

      ActiveRecord::Base.connection.tables.include?(‘table_name’)

The above will return Boolean value true / false based on the table name.

View original post