<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/when-false-is-true-vggursu5x" -->

---
title: When False is True | daily.dev
description: A Ruby on Rails API had a helper method `param_true?` that incorrectly treated boolean `false` as truthy. The bug stemmed from using `!param_value` in the...
canonical: https://daily.dev/posts/when-false-is-true-vggursu5x
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: When False is True | daily.dev
og:description: A Ruby on Rails API had a helper method `param_true?` that incorrectly treated boolean `false` as truthy. The bug stemmed from using `!param_value` in the...
og:url: https://daily.dev/posts/when-false-is-true-vggursu5x
og:image: https://api.daily.dev/og/posts/VGguRsU5X.png
og:image:alt: When False is True
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# When False is True

**[The Daily WTF](https://daily.dev/sources/thedailywtf)** · 2 min read · 0 upvotes · 0 comments

## Summary

A Ruby on Rails API had a helper method `param_true?` that incorrectly treated boolean `false` as truthy. The bug stemmed from using `!param_value` in the condition, which evaluates to `true` when the value is the boolean `false`. The issue went unnoticed because the `dry_run` flag was only ever sent via GET requests (where values are strings), but broke when a new tool sent JSON body parameters with actual boolean values in POST/PATCH/PUT requests. A secondary annoyance is that the method fetches the value before checking if the key exists, which is harmless but stylistically poor.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thedailywtf.com/articles/when-false-is-true>

## Similar posts on daily.dev

- [AAYFN](https://daily.dev/posts/aayfn-nhv65a6k6) · The Daily WTF · 0 upvotes · 0 comments
- [How Rails Builds \`params\` Before Your Action Runs](https://daily.dev/posts/how-rails-builds-params-before-your-action-runs-dli8lx1xl) · Ruby Flow · 2 upvotes · 0 comments
- [Explicit query: and body: kwargs for integration tests and more\!](https://daily.dev/posts/explicit-query-and-body-kwargs-for-integration-tests-and-more--vhhwxkt6s) · This Week in Rails · 0 upvotes · 0 comments

---

Tags: [#ruby](https://daily.dev/tags/ruby), [#rails](https://daily.dev/tags/rails)

[View this post on daily.dev](https://daily.dev/posts/when-false-is-true-vggursu5x)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"When False is True","url":"https://daily.dev/posts/when-false-is-true-vggursu5x","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/when-false-is-true-vggursu5x"},"datePublished":"2026-06-22T11:01:11.608Z","dateModified":"2026-06-22T11:01:27.772Z","description":"A Ruby on Rails API had a helper method `param_true?` that incorrectly treated boolean `false` as truthy. The bug stemmed from using `!param_value` in the...","image":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","thumbnailUrl":"https://media.daily.dev/image/upload/s--58gMhC4P--/f_auto/v1722860399/public/Placeholder%2012","isAccessibleForFree":true,"articleSection":"The Daily WTF","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Daily WTF","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d21a6aa61a7244d893a3b3284df8e2ef","url":"https://daily.dev/sources/thedailywtf"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/when-false-is-true-vggursu5x","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ruby,rails","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Daily WTF","item":"https://daily.dev/sources/thedailywtf"},{"@type":"ListItem","position":3,"name":"When False is True"}]}
```

