Skip to content

Latest commit

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Paramount

Take controll of your params in a dedicated Form Object

Installation

Add the following line to your application's Gemfile & bundle it!

gem'paramount'

Usage

$ bin/rails g paramount Book

This will create a new file in app/forms

classBookForm < Paramount::Modelattribute:titledefassignmodel.attributes=attributes#.except(:notify_me, :author_name, :geolocate, :etc)# assign_associationendprivatedefassign_association# (model.author || model.build_author).name = author_name endend

Contributing

  1. Fork it ( https://github.com/charly/paramount/fork )
  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 a new Pull Request

About

Take controll of you (rails) param

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages