Skip to content

rawhide/form_generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FormGenerator

FormGenerator can generate a class of form

Install

Add this line to your application's Gemfile:

gem 'form_generator', github: 'rawhide/form_generator'

And then execute:

$ bundle install

Generators

When you have FormGenerator installed and generate a form...

rails generate form example

The following files are created.

app/forms/example_form.rb
spec/forms/example_form_spec.rb

Usage

class ExampleForm < BaseForm
  attribute :name, String

  validates :name, presence: true
end

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published