# Rails console commands

**URL:** <https://meta.discourse.org/t/rails-console-commands/300682>\
**Category:** Development\
**Tags:** rails-console\
**Created:** [March 23, 2024, 11:40pm UTC](https://meta.discourse.org/t/rails-console-commands/300682 "2024-03-23T23:40:01Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Isambard](https://avatars.discourse-cdn.com/v4/letter/i/858c86/32.png) [@Isambard](https://meta.discourse.org/u/Isambard)\
**Post date:** [March 23, 2024, 11:40pm UTC](https://meta.discourse.org/t/rails-console-commands/300682/1 "2024-03-23T23:40:01Z")

</div>

I found the rails console and learned that you can do blackmagic such as:

```plaintext
DB.exec(<<~SQL)
  UPDATE topics
  SET title = 'psql redo!'
  WHERE id = 886
SQL

```

How do I find out what commands/functions can be executed in the console? How do I learn more about this wizardry?

Note: if not already obvious, I know nothing about Ruby or Rails.

---

_[View the full topic](https://meta.discourse.org/t/rails-console-commands/300682)._
