README.md in cambium-1.0.4 vs README.md in cambium-1.1.0
- old
+ new
@@ -229,10 +229,11 @@
fields:
name:
type: string
email:
type: string
+ readonly: true
password:
type: password
password_confirmation:
type: password
edit:
@@ -269,15 +270,44 @@
override new values for your edit form.
* `form:[new/edit]:title`: Title for the form page.
* `form:[new/edit]:fields:[field]`: Each form field gets its own unique key to
set it apart from the others.
* `form:[new/edit]:fields:[field]:type`: The type of the HTML field to render,
- which uses [SimpleForm](https://github.com/plataformatec/simple_form).
+ which uses [SimpleForm](https://github.com/plataformatec/simple_form). *You
+ can use `heading` here to break up your fields.*
+* `form:[new/edit]:fields:[field]:readonly`: If set to `true`, it will add the
+ `readonly` attribute to the input field. *Not supported for markdown fields*.
> Note: Aside from the usual form field types, Cambium uses [Mark It
> Zero!](https://github.com/seancdavis/mark_it_zero) to render markdown
> editors. You can pass `markdown` as the `type` option and it will give you a
> markdown editor.
+
+### Overriding the Base Controller
+
+I've rearranged Cambium's CMS controllers so there is a blank `BaseController`
+from which it inherits. You can manually override this in your app by creating
+a `Cambium::BaseController` and loading the appropriate files.
+
+First, generate the controller.
+
+```text
+$ bundle exec rails g controller cambium/base
+```
+
+That controller can inherit from any other controller in your app. The only
+thing you need to ensure is that it loads the `CambiumHelper` from the
+`Cambium` namespace. So, the base file should look like this:
+
+```ruby
+class Cambium::BaseController < ApplicationController
+ helper Cambium::CambiumHelper
+end
+```
+
+You can change `ApplicationController` to any other controller in your
+application.
+
Model Options
----------
Cambium makes use of many gems, and uses the behavior of those gems to drive