Form Objects and Rails' Form Builders

01-Sep-2016 3245

"Convention over configuration". This mantra is a cornerstone of Rails and a large reason it's so enjoyable to use. Adhering to Rails' sensible defaults is often the right decision when working with the framework, but at times you may be served best by trying something a little different.

Let's look at an example of where we can still adhere to Rails' contracts/conventions, and maybe write better code than Rails — the form builder.

Use coupon code:

RUBYONRAILS

to get 30% discount on our bundle!
Prepare for your next tech interview with our comprehensive collection of programming interview guides. Covering JavaScript, Ruby on Rails, React, and Python, these highly-rated books offer thousands of essential questions and answers to boost your interview success. Buy our 'Ultimate Job Interview Preparation eBook Bundle' featuring 2200+ questions across multiple languages. Ultimate Job Interview Preparation eBook Bundle