Today I’ll be finishing up my code reading session of formtastic by looking at how it creates the input fields. The Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 …
Tag: forms
Daily Code Reading #29 – Formtastic default_input_type
Today I’m looking into formtastic‘s SemanticFormBuilder#default_input_type. It’s used to guess what type of data is stored in a field so it can show the correct form element. The Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 …
Daily Code Reading #28 – Formtastic input
Today I’m tackling formtastic‘s SemanticFormBuilder#input which is used by just about every other part of formtastic to generate the form fields. The Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 …
Daily Code Reading #27 – Formtastic inputs
Yesterday I read through formtastic‘s SemanticFormBuilder#semantic_form_for. Today I’m reading through SemanticFormBuilder#inputs which formtastic uses to create a fieldset and automatically generate all of the form fields needed. The Code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 …
Daily Code Reading #26 – Formtastic semantic_form_for
I’m starting to read through a new code base this week. In my latest plugin I’ve integrated formtastic with Redmine, so I decided to start reading through some of formtastic’s methods to better understand how it works. The Code To start using formtastic, you use the semantic_form_for method so this will be a prime spot …