Releases: jacksonpires/ruby_ui_scaffold
Releases · jacksonpires/ruby_ui_scaffold
v0.1.0
First release 🎉
A Rails scaffold generator that outputs Phlex views wired to ruby_ui components — a drop-in alternative to rails g scaffold — plus a smart seed command to populate models with fake data.
Highlights
Scaffold generator — bin/rails g ruby_ui_scaffold Buddy name:string email:string admin:boolean bio:text birthday:date
- Generates the model, migration, controller, routes, tests, and Phlex view classes (
index,show,new,edit,form) under theViews::namespace. - Type-aware form inputs:
Input,Textarea,Checkbox,DatePicker(dates), file inputs, andCombobox/Selectforbelongs_toreferences. - Index with an action
DropdownMenu(Show / Edit / Delete),AlertDialogdelete confirmation (no JSconfirm), booleanBadges, and truncating cells. - New/Edit forms with a
Backlink (returns torequest.referer) and Lucide icons on the action buttons.
Flags
--datatable— DataTable index (search, per-page, sortable headers, pagination) plus the matching controller.--literal— emit views withliteralpropmacros.--phlex-layout=ClassName— wrap every view in a Phlex layout.--skip-model— re-run against an existing model (regenerate only the controller, views, and route).--skip-install— opt out of automatic setup.
One-command setup — bin/rails g ruby_ui_scaffold:install
- Idempotent: bootstraps the
ruby_uigem, runsphlex:install/ruby_ui:install, and installs the base components. Column/flag-specific components are installed on demand per scaffold, so your app only carries what it actually uses.
Seed command — bin/rails ruby_ui_scaffold:seed Buddy --count 50
- Realistic fake data via Faker, with smart inference (belongs_to foreign keys, enums, validations, and column-name heuristics).
Install
# Gemfile
gem "ruby_ui", github: "ruby-ui/ruby_ui", branch: "main", require: false
group :development do
gem "ruby_ui_scaffold"
endbundle install
bin/rails g ruby_ui_scaffold:installRequires Rails 7.1+ and a Tailwind CSS setup.
Docs
See the README for the full guide and the CHANGELOG for the complete list of changes.