Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 20 hours 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 (about 12 years ago)
- Default Branch: main
- Last Pushed: 2024-01-02T16:05:35.000Z (about 1 year ago)
- Last Synced: 2025-01-04T14:09:19.665Z (5 days ago)
- Topics: activerecord, activerecord-models, rails, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 828 KB
- Stars: 174
- Watchers: 3
- Forks: 6
- 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
[![image](https://ik.imagekit.io/hopsoft/model_probe_intro_Zf04NFJ1-.webp?updatedAt=1683471619001)](https://youtu.be/Q3IdyKateQE)
## Screenshots
Introspect your ActiveRecord models to build a deep understanding of the underlying database structure.
![ModelProbe probe](https://ik.imagekit.io/hopsoft/mode_probe_probe_3ouJjft48.webp?updatedAt=1683465723169)
Generate a well organized template for your ActiveRecord model's class definition.
![ModelProbe print_model](https://ik.imagekit.io/hopsoft/model_probe_print_model_sGOZWw-D5.webp?updatedAt=1683465723049)
Create fixture stubs to use in the test suite.
![ModelProbe print_fixture](https://ik.imagekit.io/hopsoft/model_probe_print_fixture_ZZ2TavUO7.webp?updatedAt=1683465722977)