Last Updated: February 25, 2016
· lexmag

Don't confuse `disabled` input option with `readonly` one

Rails conforms to the HTML convention.

# new.html.slim

= form_for @post do |f|
  = f.text_field :title, value: 'It will never change', readonly: true
  = f.text_field :description, value: 'You will not see it in params', disabled: true
  = f.button :submit

In controller params we will get:

params[:post] # => { "title"=>"It will never change" }