Project

paramount

0.0
No commit activity in last 3 years
No release in over 3 years
Mount your parameteres on a dedicated object to cerate & update your models and finally give power to the building parts of you controller
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

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

class BookForm < Paramount::Model

  attribute :title
  
  def assign
    model.attributes= attributes #.except(:notify_me, :author_name, :geolocate, :etc)
    # assign_association
  end

private
  def assign_association
    # (model.author || model.build_author).name = author_name 
  end
end

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