Rails UI provides rake tasks for installation and configuration, plus generators for creating pre-themed scaffolds.
railsui:scaffold
Generate a fully themed scaffold for a new resource. This works like the standard Rails scaffold generator but uses your active theme's styled templates.
rails generate railsui:scaffold Post title:string body:text published:boolean
This generates:
- Model, migration, and controller (same as Rails default)
- Pre-styled views matching your theme: index, show, new, edit, and form partial
- Routes added to
config/routes.rb
Note: Changing your Rails UI theme will not automatically update existing scaffolds. Generated views use your theme at the time of generation.
railsui:pages
Returns the list of installed pages for your active theme.
Pages are read-only. Removed pages return when updating configuration. To customize, copy pages to another view directory.
rails railsui:pages
# Example output:
# Page list for Hound theme:
# ---
# - about
# - pricing
# - dashboard
# - projects
# - project
# - messages
# - message
# - assignments
# - calendar
# - people
# - profile
# - activity
# - settings
# - notifications
# - billing
# - team
# - integrations
Pass a theme name directly. Wrap the task in quotation marks.
rails "railsui:pages[shepherd]"
# Page list for Shepherd theme:
# ---
# - about
# - pricing
# - dashboard
# - projects
# - project
# - messages
# - message
# - assignments
# - calendar
# - people
# - profile
# - activity
# - settings
# - notifications
# - billing
# - team
# - integrations