You are probably seeking:
ActiveRecord::Base.connection.tables
and
ActiveRecord::Base.connection.columns('projects').map(&:name)
You should probably wrap them in shorter syntax inside your .irbrc
.
More Related Contents:
- How can I call controller/view helper methods from the console in Ruby on Rails?
- How to sign in a user using Devise from a Rails console?
- Rails 3 – Speed up Console Loading Time
- How to avoid NoMethodError for missing elements in nested hashes, without repeated nil checks?
- Singular or plural controller and helper names in Rails
- Rails: confused about syntax for passing locals to partials
- TZInfo::DataSourceNotFound error starting Rails v4.1.0 server on Windows
- Add Custom Field/Column to Devise with Rails 4
- Ruby on Rails: Submitting an array in a form
- How can I test the page title with Capybara 2.0?
- What does “WARN Could not determine content-length of response body.” mean and how to I get rid of it?
- Difference between string and text in rails?
- What is the replacement for ActionController::Base.relative_url_root?
- Rails new vs create
- Parse a string as if it were a querystring in Ruby on Rails
- Cannot install JSON gem in rails using windows
- ERROR: Failed to build gem native extension on Mavericks
- Encoding Ruby on Rails code?
- Rails detect if request was AJAX
- Rails: PG::UndefinedTable: ERROR: relation “…” does not exist
- form_for but to post to a different action
- how to add records to has_many :through association in rails
- Rails form_for :remote=>true is not calling js method
- Rails – Sort by join table data
- strong parameters permit all attributes for nested attributes
- How can I use Rails routes to redirect from one domain to another?
- rails many to many self join
- How do I add some inserts in rails migration?
- Rails 3 SSL routing redirects from https to http
- Unable to install MySQL2 gem on Windows 7