Docs
Commands

Commands

Rails UI provides rake tasks for installation and configuration, plus generators for creating pre-themed scaffolds.


Generators

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.


Rake tasks

railsui:install

Run this task to install Rails UI. The default theme, Hound, is installed and can be changed anytime.

rails railsui:install

railsui:update

Updates your Rails UI configuration. Use this to manually save your railsui.config file after manual tweaks.

rails railsui:update

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

Get all updates directly to your inbox.
Sign up for the newsletter.

    We won't send you spam. Unsubscribe at any time.