Skip to content

tsmsogn/to_quickform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ToQuickform

Build Status Maintainability

ToQuickform creates some QuickForm codes from given data.

Installation

Add this line to your application's Gemfile:

gem 'to_quickform'

And then execute:

$ bundle

Or install it yourself as:

$ gem install to_quickform

Usage

Parsing an YAML/JSON

generator = ToQuickform.YAML(yaml)
generator = ToQuickform.JSON(json)

YAML format:

See https://github.com/tsmsogn/to_quickform/blob/master/spec/fixtures/sample.yaml

JSON format:

See https://github.com/tsmsogn/to_quickform/blob/master/spec/fixtures/sample.json

Creating setDefaults() codes

generator.to_set_defaults

Output https://github.com/tsmsogn/to_quickform/blob/master/spec/fixtures/set_defaults.txt

Creating addElement()/createElement() codes

generator.to_create_element

Output https://github.com/tsmsogn/to_quickform/blob/master/spec/fixtures/create_element.txt

Creating addRule()/addGrouoRule() codes

generator.to_add_rule

Output https://github.com/tsmsogn/to_quickform/blob/master/spec/fixtures/add_rule.txt

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tsmsogn/to_quickform.

About

ToQuickform creates some QuickForm codes from given data.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published