{"id":14955571,"url":"https://github.com/threespot/tolaria","last_synced_at":"2026-02-27T23:16:23.519Z","repository":{"id":8434543,"uuid":"10024046","full_name":"Threespot/tolaria","owner":"Threespot","description":"A Rails CMS framework for making your editors happy.","archived":false,"fork":false,"pushed_at":"2024-06-06T14:05:56.000Z","size":2459,"stargazers_count":37,"open_issues_count":21,"forks_count":5,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-10-29T14:15:20.442Z","etag":null,"topics":["administrator","cms","cms-framework","rails","rails5"],"latest_commit_sha":null,"homepage":"https://threespot.github.io/tolaria/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Threespot.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-05-13T04:03:06.000Z","updated_at":"2023-12-14T01:13:21.000Z","dependencies_parsed_at":"2024-01-13T19:25:29.047Z","dependency_job_id":"7176b5db-ee52-473b-892c-464a33779877","html_url":"https://github.com/Threespot/tolaria","commit_stats":{"total_commits":339,"total_committers":10,"mean_commits":33.9,"dds":0.3687315634218289,"last_synced_commit":"00513ba4b293f887443ecd1465b898a0ab465a67"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threespot%2Ftolaria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threespot%2Ftolaria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threespot%2Ftolaria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Threespot%2Ftolaria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Threespot","download_url":"https://codeload.github.com/Threespot/tolaria/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234724401,"owners_count":18877188,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["administrator","cms","cms-framework","rails","rails5"],"created_at":"2024-09-24T13:11:23.275Z","updated_at":"2025-10-01T18:31:35.151Z","avatar_url":"https://github.com/Threespot.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Tolaria\n\n[![Build Status](https://travis-ci.org/Threespot/tolaria.svg?branch=master)](https://travis-ci.org/Threespot/tolaria)\n\nTolaria is a [content management system](https://en.wikipedia.org/wiki/Content_management_system) (CMS) framework for [Ruby on Rails](https://en.wikipedia.org/wiki/Ruby_on_Rails). It greatly speeds up the necessary—but repetitive—task of creating useful admin panels, forms, and model workflows for site authors.\n\n[![](https://cloud.githubusercontent.com/assets/769083/8262095/ccb2b68e-169d-11e5-9378-0d098eb22c22.png)](https://cloud.githubusercontent.com/assets/769083/7573791/56eda172-f7f6-11e4-8df7-36015cf5cf85.png)\n\n[![](https://cloud.githubusercontent.com/assets/769083/8262101/d64a4478-169d-11e5-879e-4927640c5f39.png)](https://cloud.githubusercontent.com/assets/769083/7573968/cc448ebc-f7f7-11e4-8593-c6465d3a8e3c.png)\n\n### Features\n\n- Fully responsive (and we think it's beautiful too!)\n- A complete email-based authentication system is included, and there are no passwords to manage.\n- Automatically builds navigation and admin routes for you.\n- Automatically creates simple index screens, show screens, and text search tools, which you can expand.\n- Includes a handful of advanced form fields, notably a fullscreen Markdown editor and searchable select/tag lists.\n- Assists in providing inline help and documentation to your editors.\n- No magic DSL. Work directly in ERB on all admin views.\n- Compartmentalized from the rest of the Rails application, and does not rely on the behavior of `to_param`.\n- Easily overridable on a case-by-case basis.\n- Designed for use on Heroku, in containers, and on websites with TLS.\n- Modest dependencies.\n- Compatible with Rails 6, 5 and Rails 4.2.\n\n### Browser Support\n\nTolaria supports IE10+, Edge, Safari, Chrome, Firefox, iOS, and Chrome for Android. Note that these are the browsers your site editors will need, not the general site audience, which can differ.\n\n### Getting Started\n\nAdd Tolaria to your project's `Gemfile`:\n\n```ruby\n# If you are running Rails 6, use Tolaria 3\ngem \"tolaria\", \"~\u003e 3.0\"\n\n# If you are running Rails 5, use Tolaria 2\ngem \"tolaria\", \"~\u003e 2.0\"\n\n# If you are running Rails 4.2, use Tolaria 1.2\ngem \"tolaria\", \"~\u003e 1.2\"\n```\n\nThen update your bundle with `bundle update`\n\nNow run the installation generator. This will create an initializer for Tolaria plus a migration to set up an `administrators` table. Migrate your database.\n\n```shell\n$ rails generate tolaria:install\n$ rake db:migrate\n```\n\nReview all of the settings in `config/initializers/tolaria.rb`.\n\nRun this Rake command to create your first administrator account:\n\n```shell\n$ rake admin:create\n```\n\nNow you'll need to add Tolaria's route drawing to the top of your `routes.rb` file like so:\n\n```ruby\nRails.application.routes.draw do\n  Tolaria.draw_routes(self)\n  # Your other routes below here\nend\n```\n\n##### ActionMailer\n\nTolaria needs to be able to dispatch email. You'll need to configure ActionMailer to use an appropriate mail service. Here's an example using [Mailgun on Heroku](https://devcenter.heroku.com/articles/mailgun):\n\n```ruby\n# config/initializers/action_mailer.rb\n\nActionMailer::Base.perform_deliveries = true\nActionMailer::Base.delivery_method = :smtp\n\nActionMailer::Base.smtp_settings = {\n  port: ENV.fetch(\"MAILGUN_SMTP_PORT\"),\n  address: ENV.fetch(\"MAILGUN_SMTP_SERVER\"),\n  user_name: ENV.fetch(\"MAILGUN_SMTP_LOGIN\"),\n  password: ENV.fetch(\"MAILGUN_SMTP_PASSWORD\"),\n  domain: \"example.org\",\n  authentication: :login,\n  enable_starttls_auto: true,\n}\n```\n\nNow start your Rails server and go to `/admin` to log in!\n\n### Adding Administrator Accounts\n\nYou can add administrators from the command line using a Rake task. This is particularly useful for creating the very first one.\n\n```shell\n# Add an administrator interactively\n$ rake admin:create\n\n# Or you can provide environment variables\n$ rake admin:create NAME=\"Evon Gnashblade\" EMAIL=\"example@example.org\" ORGANIZATION=\"BLTC\"\n```\n\nIf you are already logged in to Tolaria, you can also simply visit `/admin/administrators` to create a new account using the CMS interface.\n\n### Passcode Authentication\n\nTolaria authenticates editors via email, using a one-time passcode. When an editor wants to sign in, they must type a passcode dispatched to their email address. Passcodes are invalidated after use.\n\nYou can configure Tolaria's passcode paranoia in the initializer you installed above.\n\n![](https://cloud.githubusercontent.com/assets/769083/8137572/5e81bb1e-1112-11e5-9626-fc7a0010f0c4.png)\n\n### Managing a Model\n\nInside your ActiveRecord definition for your model, call `manage_with_tolaria`, passing configuration in the `using` Hash. [Refer to the documentation for all of the options](http://www.rubydoc.info/gems/tolaria/ActiveRecord%2FBase.manage_with_tolaria).\n\nThe icon system uses [Font Awesome][fa], and you'll need to pass one of [the icon names][fa] for the `icon` key.\n\n[fa]: http://fontawesome.io/icons/\n\n**Important:** you'll need to provide the options to pass to `params.permit` here for the admin system. Your form won't work without it!\n\n```ruby\nclass BlogPost \u003c ActiveRecord::Base\n  manage_with_tolaria using: {\n    icon: \"file-o\",\n    category: \"Settings\",\n    priority: 5,\n    permit_params: [\n      :title,\n      :body,\n      :author_id,\n    ]\n  }\nend\n```\n\n### Customizing Indexes\n\nBy default, Tolaria will build a simple index screen for each model. You'll likely want to replace it for complicated models, or to allow administrators to sort the columns.\n\nIf your model was `BlogPost`, you'll need to create a file in your project at: `app/views/admin/blog_posts/_index.html.erb`.\n\nSee the [TableHelper documentation](http://www.rubydoc.info/gems/tolaria/Admin/TableHelper) for more information.\n\n```erb\n\u003c% # app/views/admin/blog_posts/_index.html.erb %\u003e\n\n\u003c%= index_table do %\u003e\n  \u003cthead\u003e\n    \u003ctr\u003e\n      \u003c%= index_th :id %\u003e\n      \u003c%= index_th :title %\u003e\n      \u003c%= index_th \"Author\", sort: false %\u003e\n      \u003c%= actions_th %\u003e\n    \u003c/tr\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003c% @resources.each do |blog_post| %\u003e\n      \u003ctr\u003e\n        \u003c%= index_td blog_post, :id %\u003e\n        \u003c%= index_td blog_post, :title %\u003e\n        \u003c%= index_td blog_post, blog_post.author.name, image:blog_post.author.portrait_uri %\u003e\n        \u003c%= actions_td blog_post %\u003e\n      \u003c/tr\u003e\n    \u003c% end %\u003e\n  \u003c/tbody\u003e\n\u003c% end %\u003e\n```\n\n### Customizing The Inspect Screen\n\nTolaria provides a very basic show/inspect screen for models. You'll want to provide your own for complex models.\n\nIf your model was `BlogPost`, you'll need to create a file in your project at: `app/views/admin/blog_posts/_show.html.erb`.\n\nSee the [TableHelper documentation](http://www.rubydoc.info/gems/tolaria/Admin/TableHelper) for more information.\n\n```erb\n\u003c% # app/views/admin/blog_posts/_show.html.erb %\u003e\n\n\u003c%= show_table do %\u003e\n\n  \u003cthead\u003e\n    \u003c%= show_thead_tr %\u003e\n  \u003c/thead\u003e\n  \u003ctbody\u003e\n    \u003c%= show_tr :title %\u003e\n    \u003c%= show_tr \"Author\", @resource.author.name %\u003e\n    \u003c%= show_tr :body %\u003e\n  \u003c/tbody\u003e\n\n\u003c% end %\u003e\n```\n\n### Adding Model Forms\n\nTolaria does not build editing forms for you, but it attempts to help speed up your work by providing a wrapper.\n\nIf your model was `BlogPost`, you'll need to create a file in your project at `app/views/admin/blog_posts/_form.html.erb`. You'll provide the form code that would appear inside the `form_for` block, excluding the submit buttons. The builder variable is `f`.\n\n```erb\n\u003c% # app/views/admin/blog_posts/_form.html.erb %\u003e\n\n\u003c%= f.label :title %\u003e\n\u003c%= f.text_field :title, placeholder:\"Post title\" %\u003e\n\u003c%= f.hint \"The title of this post. A good title is both summarizing and enticing, much like a newspaper headline.\" %\u003e\n\n\u003c%= f.label :author_id, \"Author\" %\u003e\n\u003c%= f.searchable_select :author_id, Author.all, :id, :name, include_blank:false %\u003e\n\u003c%= f.hint \"Select the person who wrote this post.\" %\u003e\n\n\u003c%= f.label :body %\u003e\n\u003c%= f.markdown_composer :body %\u003e\n\u003c%= f.hint \"The body of this post. You can use Markdown!\"\n```\n\n### Has-many Nested Forms\n\nIf you want to provide an interface for a `has_many` + `accepts_nested_attributes_for` relationship, you can use the `has_many` helper. The UI allows slating persisted objects for removal when the form is saved.\n\n**Important**: You need to include `f.has_many_header` to create the form headers and turn on or off the destruction controls with `allow_destroy`.\n\n```erb\n\u003c%= f.has_many :footnotes do |f| %\u003e\n\n  \u003c%= f.has_many_header allow_destroy:true %\u003e\n\n  \u003c%= f.label :description %\u003e\n  \u003c%= f.text_field :description %\u003e\n  \u003c%= f.hint \"The name or other description of this reference\" %\u003e\n\n  \u003c%= f.label :url, \"URL\" %\u003e\n  \u003c%= f.text_field :url, class:\"monospace\" %\u003e\n  \u003c%= f.hint \"A full URL to the source or reference material\" %\u003e\n\n\u003c% end %\u003e\n```\n\n![](https://cloud.githubusercontent.com/assets/769083/8117475/50e5d0e2-1056-11e5-87a6-07bc7458da1e.png)\n\nDon't forget that you also need to change `permit_params` so that you include your nested attributes:\n\n```ruby\nclass BlogPost \u003c ActiveRecord::Base\n  manage_with_tolaria using: {\n    icon: \"file-o\",\n    category: \"Settings\",\n    priority: 5,\n    permit_params: [\n      :title,\n      :body,\n      :author_id,\n      :footnotes_attributes: [\n        :id,\n        :_destroy,\n        :url,\n        :description,\n      ]\n    ]\n  }\nend\n```\n\n### Customizing The Search Form\n\nBy default, Tolaria provides a single search field that searches over all of the text or character columns of a model. You can expand the search tool to include other facets.\n\n**Important:** This system uses the [Ransack gem][ransack], which you'll need to familiarize yourself with.\n\nIf your model was `BlogPost`, you'll need to create a file in your project at `app/views/admin/blog_posts/_search.html.erb`. You'll provide the form code that would appear inside the `search_form_for` block, excluding the submit buttons. The builder variable is `f`.\n\n```erb\n\u003c% # app/views/admin/blog_posts/_search.html.erb %\u003e\n\n\u003c%= f.label :title_cont, \"Title contains\" %\u003e\n\u003c%= f.search_field :title_cont, placeholder:\"Anything\" %\u003e\n\n\u003c%= f.label :author_name_cont, \"Author is\" %\u003e\n\u003c%= f.searchable_select :author_name_cont, Author.all, :name, :name, prompt:\"Any author\" %\u003e\n\n\u003c%= f.label :body_cont, \"Body contains\" %\u003e\n\u003c%= f.search_field :body_cont, placeholder:\"Anything\" %\u003e\n```\n\n[ransack]: https://github.com/activerecord-hackery/ransack\n\n### Provided Form Fields\n\nYou can use all of the Rails-provided fields on your forms, but Tolaria also comes with a set of advanced, JavaScript-backed fields. Make sure to [review the documentation for the form builder](http://www.rubydoc.info/gems/tolaria/Admin/FormBuilder) to get all the details.\n\n#### Markdown Composer\n\nThe [`markdown_composer` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Amarkdown_composer) will generate a very fancy Markdown editor, which includes text snippet tools and a fullscreen mode with live previewing.\n\n**Important:** You cannot use this field properly if you do not set up `Tolaria.config.markdown_renderer`. Without it, the live preview will only use `simple_format`!\n\n```\n\u003c%= f.label :body %\u003e\n\u003c%= f.markdown_composer :body %\u003e\n\u003c%= f.hint \"The body of this post. You can use Markdown!\" %\u003e\n```\n\n![markdown_composer](https://cloud.githubusercontent.com/assets/769083/7888521/407d0116-0607-11e5-91fe-a046c22ea777.png)\n\n#### Searchable Select\n\nThe [`searchable_select` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Asearchable_select) displays a [Chosen select field](http://harvesthq.github.io/chosen/) that authors can filter by typing.\n\n```\n\u003c%= f.label :title, \"Topics\" %\u003e\n\u003c%= f.searchable_select :topic_ids, Topic.order(\"label ASC\"), :id, :label, multiple:true %\u003e\n\u003c%= f.hint \"Select each topic that applies to this blog post\" %\u003e\n```\n\n![searchable_select](https://cloud.githubusercontent.com/assets/769083/7888524/41aba54c-0607-11e5-9c5f-483b5ecf5ea9.png)\n\n#### Image Association Select\n\nThe [`image_association_select` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Aimage_association_select) displays a `searchable_select` that provides an instant preview of the currently selected model as an image.\n\n```erb\n\u003c%= f.label :featured_image_id, \"Featured Image\" %\u003e\n\u003c%= f.image_association_select :featured_image_id, Image.order(\"title ASC\"), :id, :title, :preview_uri %\u003e\n\u003c%= f.hint \"Select a featured image for this blog post.\" %\u003e\n```\n\n![](https://cloud.githubusercontent.com/assets/769083/8119314/a83565c2-1062-11e5-92e6-5a6bcd1bb5ea.png)\n\n#### Timestamp Field\n\nThe [`timestamp_field` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Atimestamp_field) displays a text field that validates a provided timestamp and recovers to a template if blanked.\n\n```erb\n\u003c%= f.label :published_at, \"Publishing Date\" %\u003e\n\u003c%= f.timestamp_field :published_at %\u003e\n\u003c%= f.hint \"The date this post should be published.\" %\u003e\n```\n\n![timestamp_field](https://cloud.githubusercontent.com/assets/769083/7888528/4487a9b4-0607-11e5-9298-bc26116b59f0.png)\n\n#### Slug Field\n\nThe [`slug_field` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Aslug_field) allows you to show the parameterized value of a field in a given pattern preview.\n\n```erb\n\u003c%= f.label :title %\u003e\n\u003c%= f.slug_field :title, placeholder:\"Post title\", pattern:\"/blog/255-*\" %\u003e\n\u003c%= f.hint \"The title of this post.\" %\u003e\n```\n\n![slug_field](https://cloud.githubusercontent.com/assets/769083/7888526/42ac965e-0607-11e5-9be6-0300f0f0f04d.png)\n\n#### Swatch Field\n\nThe [`swatch_field` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Aswatch_field) validates and displays a given hexadecimal color.\n\n```erb\n\u003c%= f.label :color %\u003e\n\u003c%= f.swatch_field :color, placeholder:\"#CC0000\" %\u003e\n\u003c%= f.hint \"Choose a background color for this campaign\"\u003e\n```\n\n![swatch_field](https://cloud.githubusercontent.com/assets/769083/7888518/3e2e1828-0607-11e5-8bca-79bdfa3b6a06.png)\n\n#### Image Field\n\nThe [`image_field` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Aimage_field) displays a button that makes uploading an image a little more pleasant than a regular `file_field`.\n\n```erb\n\u003c%= f.label :portrait %\u003e\n\u003c%= f.image_field :portrait, preview_url:@resource.portrait.url(:preview) %\u003e\n\u003c%= f.hint \"Attach a portrait of this author, at least 600×600 pixels in size. The subject should be centered.\" %\u003e\n```\n\n![image_field](https://cloud.githubusercontent.com/assets/769083/7888520/3f700750-0607-11e5-952a-e81edbb58017.png)\n\n#### Attachment Field\n\nThe [`attachment_field` helper](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Aattachment_field) displays a button that makes uploading an arbirary file a little more pleasant than a regular `file_field`.\n\n```erb\n\u003c%= f.label :portrait %\u003e\n\u003c%= f.attachment_field :portrait %\u003e\n\u003c%= f.hint \"Attach a portrait of this author, at least 600×600 pixels in size. The subject should be centered.\" %\u003e\n```\n\n![attachment_field](https://cloud.githubusercontent.com/assets/769083/7888501/2c5d3160-0607-11e5-8b44-9c8affaa1f8d.png)\n\n#### Field Clusters (Checkboxes and 2+ Selects)\n\nTolaria includes a wrapper for grouped form elements, `\u003cdiv class=\"field-cluster\"\u003e`. You should use this wrapper if:\n\n- You need to run two or more small `select` controls together (like for `date_select`). The wrapper styles the selects to snuggle closely.\n- You want to use a naked checkbox control or a set of checkboxes (`check_box` and `collection_checkboxes`)\n\n```erb\n\u003c%= f.label :published_at, \"Publishing Date\" %\u003e\n\u003cdiv class=\"field-cluster\"\u003e\u003c%= f.date_select :published_at %\u003e\u003c/div\u003e\n\u003c%= f.hint \"The date this post should be published.\" %\u003e\n\n\u003c%= f.label :title, \"Topics\" %\u003e\n\u003cdiv class=\"field-cluster\"\u003e\u003c%= f.collection_check_boxes :topic_ids, Topic.order(\"label ASC\"), :id, :label %\u003e\u003c/div\u003e\n\u003c%= f.hint \"Choose each topic that applies to this blog post\" %\u003e\n```\n\n![](https://cloud.githubusercontent.com/assets/769083/8138732/774630c2-111b-11e5-8024-bdec00ed18c4.png)\n\n#### Hints\n\n[Inline help](http://www.rubydoc.info/gems/tolaria/Tolaria%2FFormBuildable%3Ahint) is useful for reminding administrators about what should be provided for each field. Use `f.hint` to present a hint for a field.\n\n![hint](https://cloud.githubusercontent.com/assets/769083/7888576/8d20f8a6-0607-11e5-80ea-2c8f66ad7449.png)\n\n#### Extra Classes\n\nTolaria includes a few CSS classes that are designed for simple inputs, selects, and textareas:\n\n- Add a class of `monospace` to an element to make it use a system monospace font. Useful for fields that accept URLs and other computer-interpreted values.\n- Add a class of `short` to an element to constrain it visually to 300px. Useful for fields that only need very few characters of input.\n\n### Customizing the Menu\n\nWhen you call `manage_with_tolaria`, you can provide a category and a priority like below. Items in the same category will be grouped together in the navigation menu. Items are sorted priority ascending in their group.\n\n```ruby\nclass BlogPost \u003c ActiveRecord::Base\n  manage_with_tolaria using:{\n    category: \"Prose\",\n    priority: 5,\n  }\nend\n```\n\nIf you want to re-order the groups, you need to set an array of menu titles ahead of time in `Tolaria.config.menu_categories`:\n\n```ruby\n# config/initializers/tolaria.rb\nTolaria.configure do |config|\n  config.menu_categories = [\n    \"Prose\",\n    \"Animals\",\n    \"Settings\",\n  ]\nend\n```\n\n### Adding Documentation Links\n\nYou can provide documentation links in the interface header by appending to `Tolaria.config.help_links`. Add hashes to the array, with these keys:\n\nTo render a Markdown file, provide a `:title`, the URL fragment `:slug`, and a `:markdown_file` path to your Markdown document. The system will automatically draw a route to this view for you and present your file, using the renderer configured in `Tolaria.config.markdown_renderer`.\n\nTo link to an arbitrary route or URL, provide a `:title` and a `:link_to`. Examples below:\n\n```ruby\n# config/initializers/tolaria.rb\n\nTolaria.configure do |config|\n\n  config.help_links \u003c\u003c {\n   title: \"Markdown Reference\"\n   slug: \"markdown-reference\",\n   markdown_file: \"/path/to/your/file.md\"\n  }\n\n  config.help_links \u003c\u003c {\n   title: \"Style Guide\"\n   link_to: \"http://example.org/styleguide\"\n  }\n\nend\n```\n\n### Patching a Controller\n\nTolaria dynamically creates controllers for managed models, named as you would expect. If you want to replace or add to controller functionality, create the file in your parent application and patch away:\n\nIf your model was `BlogPost`, you should create `app/controllers/admin/blog_posts_controller.rb`\n\n```ruby\n# app/controllers/admin/blog_posts_controller.rb\nclass Admin::BlogPostsController \u003c Tolaria::ResourceController\n  def another_method\n     # do stuff\n     # render a template\n  end\nend\n```\n\nYou might want to [check out what we've done in the base ResourceController](https://github.com/Threespot/tolaria/blob/master/app/controllers/tolaria/resource_controller.rb) file so that you know what you're patching. If you override any of the existing methods, you're on your own to handle everything correctly.\n\n### Adding Your Own Styles or JavaScript\n\nIf you want to add additional Sass or JavaScript to the admin system, you can create these files and then append to them as you need. Make sure that you import the base styles and JavaScript so you inherit what's already been done.\n\n`app/assets/stylesheets/admin/admin.scss`:\n\n```sass\n@import \"admin/base\";\n// Your code goes here\n```\n\n`app/assets/javascripts/admin/admin.js`:\n\n```javascript\n//= require admin/base\n// Your code goes here\n```\n\n### Testing and Running the Demo Server\n\nTolaria comes with a test suite and a demo server that the test suite exercises.\n\nTo run tests, first clone the repo or your fork of it:\n\n```shell\n$ git clone -o github git@github.com:threespot/tolaria.git\n$ cd tolaria\n```\n\nInstall the development dependencies:\n\n```\n$ bundle install\n```\n\nNow in the project root, you have several `rake` tasks available:\n\n```shell\n$ rake test         # Run the tests\n$ rake admin:create # Create an admin in the demo development database\n$ rake console      # Start a Rails console with Tolaria loaded\n$ rake server       # Start a Rails Webrick server with Tolaria and some example models loaded\n```\n\n### Miscellaneous Technical Details\n\n- Tolaria is not designed for use on a production site without TLS/HTTPS configured. You must protect Tolaria sessions and cookies with TLS. Do not allow users to connect to your administrator panel over plain HTTP.\n- If you are using `Content-Security-Policy`, you will need to add `https://secure.gravatar.com` to the allowed image sources in order to display administrator avatars. All other assets bundled with Tolaria are served by the Rails asset pipeline.\n- The constant and module name `Admin` is reserved for Tolaria's use. If you add to this namespace, be sure you are not colliding with a Tolaria-provided constant.\n- The route space `/admin/**/*` is reserved for Tolaria's use. If you add routes here, be sure you are not colliding with a Tolaria-generated route.\n\n### License\n\nTolaria is free software, and may be redistributed under the terms of the [MIT license](https://github.com/Threespot/tolaria/blob/master/LICENSE.md). If Tolaria works great for your project, [we'd love to hear about it](http://twitter.com/threespot)!\n\n### Thanks\n\nOur work stands on the shoulders of giants, and we're very thankful to the many people that made Tolaria possible either by publishing code we used, or by being an inspiration for this project.\n\n- [The ActiveAdmin team](https://github.com/activeadmin/activeadmin/graphs/contributors)\n- [The jQuery Foundation](https://jquery.org)\n- [Jeremy Ashkenas](https://twitter.com/jashkenas)\n- [The Harvest Team](https://www.getharvest.com/about/meet-the-team)\n- [Font Awesome and Dave Gandy](http://fontawesome.io/icons/)\n\n### About Threespot\n\nThreespot is a design and development agency from Washington, DC. We work for organizations that we believe are making a positive change in the world. Find out more [about us](https://www.threespot.com), [our projects](https://www.threespot.com/work) or [hire us](https://www.threespot.com/agency/hire-us)!\n\n[![](https://avatars3.githubusercontent.com/u/370822?v=3\u0026s=100)](https://www.threespot.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreespot%2Ftolaria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthreespot%2Ftolaria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthreespot%2Ftolaria/lists"}