Refinery CMS Forms Generator
Switch branches/tags
Nothing to show
Clone or download
Latest commit 496d3ce May 16, 2018
Permalink
Failed to load latest commit information.
bin Fix bin/rails Oct 3, 2017
lib Now use render html in Admin#SettingsController update May 11, 2018
spec Added testing support as this is now an extension. Sep 19, 2015
tasks Added testing support as this is now an extension. Sep 19, 2015
.gitignore Added testing support as this is now an extension. Sep 19, 2015
.travis.yml Update to support refinery cms 4.0 and rails 5.1 Sep 30, 2017
Gemfile Add ability to interact with the dummy app May 11, 2018
Rakefile Added testing support as this is now an extension. Sep 19, 2015
license.md Added testing support as this is now an extension. Sep 19, 2015
readme.md
refinerycms-forms.gemspec Bump version to 2.0.0 Sep 30, 2017

readme.md

Refinery CMS forms

Build Status

Simple forms engine generator for Refinery CMS.

Requirements

Refinery CMS version 3.0.0 or above.

Install

Open up your Gemfile and add at the bottom this line:

gem 'refinerycms-forms', git: 'https://github.com/refinery/refinerycms-forms', branch: 'master', group: :development

Now run bundle install.

Usage

Example:

$ rails generate refinery:form job_inquiry name:string message:text job_type:radio brochure:checkbox qualification:select --authors 'John Jones'

Description

Generates a custom forms based extension for Refinery automatically. It works very similarly to the Refinery Engine generator.

The first string attribute should always be the one which is the title or name field in your model.

There must be at least one attribute.

Additional Supported Field Types

All field types that are supported by the Refinery Engine generator are supported with the addition of these form specific ones:

  • radio - creates a set of radio buttons based off Model::FIELD_NAMES
  • checkbox - creates a checkbox for true/false values.
  • select - creates a select list with options using Model::FIELD_NAMES

Developing & Contributing

The version of Refinery to develop this engine against is defined in the gemspec. To override the version of refinery to develop against, edit the project Gemfile to point to a local path containing a clone of refinerycms.

Testing

Generate the dummy application to test against

$ bundle exec rake refinery:testing:dummy_app

Run the test suite with Guard

$ bundle exec guard start

Or just with rake spec

$ bundle exec rake spec

More Information