https://github.com/hopsoft/model_probe
ActiveRecord schema visualization and model organization made easy
https://github.com/hopsoft/model_probe
activerecord activerecord-models rails ruby-on-rails
Last synced: 4 days ago
JSON representation
ActiveRecord schema visualization and model organization made easy
- Host: GitHub
- URL: https://github.com/hopsoft/model_probe
- Owner: hopsoft
- License: mit
- Created: 2012-10-30T22:32:06.000Z (over 12 years ago)
- Default Branch: main
- Last Pushed: 2024-01-02T16:05:35.000Z (over 1 year ago)
- Last Synced: 2025-03-28T23:07:34.086Z (11 days ago)
- Topics: activerecord, activerecord-models, rails, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 828 KB
- Stars: 174
- Watchers: 2
- Forks: 7
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# ModelProbe
## ActiveRecord schema visualization and model organization made easy 🙌
Colorized table info for columns, types, nullables, indexes...
and the actual DDL used by the database to create the table.
_All this and more with ModelProbe!_1. Get a clear picture of your model's underlying schema with beautiful and informative schema introspection.
1. Generate model class definitions with a well organized, logical structure.
1. Create sensible text fixture stubs.## Table of Contents
- [Quick Start](#quick-start)
- [Supported Databases](#supported-databases)
- [Videos](#videos)
- [Screenshots](#screenshots)## Quick Start
1. Add the GEM to your project
```sh
bundle add model_probe
```_ModelProbe auto initializes in the Rails `development` environment._
1. Use in a Rails console
```ruby
# examples for a User model
User.probe
User.print_model
User.print_fixture
```
1. Use with Rails (Rake) tasks```sh
# examples for a User model
bin/rails model_probe:probe[User]
bin/rails model_probe:print_model[User]
bin/rails model_probe:print_fixture[User]
```## Supported Databases
- MySQL
- PostgreSQL
- SQLite
- _...more? contributions welcome ;)_## Videos
[](https://youtu.be/Q3IdyKateQE)
## Screenshots
Introspect your ActiveRecord models to build a deep understanding of the underlying database structure.

Generate a well organized template for your ActiveRecord model's class definition.

Create fixture stubs to use in the test suite.
