reform Blogs
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
Kiprosh is now part of LawLytics
Written by Kiprosh, team of passionate and disciplined craftsmen turning your ideas into reality.
There may be times when you want to decouple your form objects from the model, in simple words, insert another layer between your View and the Model, Reform is all about that. Reform gives you a form object with validations and nested setup of models. It is completely framework-agnostic and doesn't care about your database. Installing Reform Add this line to your gemfile ; gem 'reform' Since Reform 2.2, you've to add reform-rails gem to your gemfile to automatically load ActiveModel/Rails files. gem 'reform-rails' Defining Forms Let's say we want to decouple our Model Album, which has title attribute.