thoughtbot / thoughtbot/form_props
Unchecked value should always be a string if not null
Open
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 50
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
This makes it consistent with hidden input values in HTML. Which is how unchecked values are used.
Relevant snippet In check_box.rb,
module FormProps
module Inputs
class CheckBox < Base
def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options)
@checked_value = checked_value
@unchecked_value = unchecked_value
super(object_name, method_name, template_object, options)
end
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in check_box.rb at FormProps::Inputs::CheckBox#initialize, where @checked_value and @unchecked_value are assigned. Trace how the unchecked value is rendered and verify the behavior against the issue's HTML hidden-input expectation. Done means every non-null unchecked value is represented as a string while null remains null.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100