A modern, responsive admin framework for Ruby on Rails

Build a back-end in minutes that will grow with the needs of your application.

Trestle screenshot 1
Trestle screenshot 2

Modern UI

Trestle provides a modern, responsive interface that you can be proud to put in front of your users.

Simple DSL

Build your back-end quickly and easily using a powerful admin builder DSL. See the example below.

Easy to Extend

Take your admin even further using regular Rails templates, or create reusable form components.

Customizable

Make your Trestle admin your own by adding your company's colors, logo and more.

Built with Bootstrap

Bootstrap provides an extensive and familiar framework for customizing your Trestle admin.

Plugin Ecosystem

Core plugins with extra functionality ready to add to your admin, with more under development.

Authentication (via trestle-auth)

Let Trestle handle the complexities of authentication. Use the built-in Administrator model or roll your own.

Search (via trestle-search)

Easily add search to your admin using basic queries or more complex search indexes.

Open Source

Trestle is licensed under LGPL v3.0 and is developed and published on GitHub.

Trestle.resource(:posts) do  # Add a link to this admin in the main navigation
  menu :posts, icon: "fa fa-file-text-o", group: :blog_management
  # Define custom scopes for the index view
  scope :all, default: true
  scope :published
  scope :drafts, -> { Post.unpublished }
  # Define the index view table listing
  table do
    column :title, link: true
    column :author, ->(post) { post.author.name }
    column :published, align: :center do |post|
      status_tag(icon("fa fa-check"), :success) if post.published?
    end
    column :updated_at, header: "Last Updated", align: :center
    actions
  end
  # Define the form structure for the new & edit actions
  form do    # Organize fields into tabs and sidebars
    tab :post do
      text_field :title
      # Define custom form fields for easy re-use
      editor :body    end
    tab :metadata do      # Layout fields based on a 12-column grid
      row do
        col(sm: 6) { select :author, User.all }
        col(sm: 6) { tag_select :tags }
      end    end
    sidebar do
      # Render a custom partial: app/views/admin/posts/_sidebar.html.erb
      render "sidebar"
    end  end
end
Dsl menu Dsl scopes Dsl table Dsl form Dsl editor Dsl grid Dsl sidebar