Mechanical
All models in a single table, new attributes without migrations. Works like regular AR model
No ratings yet
- Gem
- mechanical
- Repository
- igorkasyanchuk/mechanical
- License
- MIT
- Stars
- 17
- Added
- August 09, 2026
About
All models in a single table, new attributes without migrations. Works like regular AR model
Simple gem which allows to store multiple models in a single table in DB (Postgres only). It's using STI and Postgres JSONB data type.
What you get
- add in the Gemfile
gem "mechanical" - execute
bundle install - execute
rails g mechanical initializer - execute
rake db:migrate - edit
config/initializers/mechanical.rband define your schema - start app
rails s - you can use models
Mechanical::Model::MODEL_NAMEin you app like a regular model.
Installing it
ruby
# Gemfile
gem "mechanical"
Details
17 stars on GitHub · MIT licensed · maintained by igorkasyanchuk. Source: https://github.com/igorkasyanchuk/mechanical
Discussion (0)
Sign in to join the discussion.
No comments yet.