Skip to content

Refactor name controller with concerns#288

Merged
lmrodriguezr merged 1 commit into
mainfrom
refactor-names-controller
Jun 22, 2026
Merged

Refactor name controller with concerns#288
lmrodriguezr merged 1 commit into
mainfrom
refactor-names-controller

Conversation

@lmrodriguezr

Copy link
Copy Markdown
Member

No description provided.

@lmrodriguezr lmrodriguezr merged commit 4165d65 into main Jun 22, 2026
@lmrodriguezr lmrodriguezr deleted the refactor-names-controller branch June 22, 2026 08:56
vangberg added a commit that referenced this pull request Jun 30, 2026
`NamesController#user` sets `params[:status] = 'all'`. Before pull request #288
this was converted into `opts[:status] = nil`:

```ruby
    opts[:status] ||=
      case @status.to_s.downcase
      when 'public';    Name.public_status
      when 'automated'; 0
      when 'seqcode';   15
      when 'icnp';      20
      when 'icnafp';    25
      when 'valid';     Name.valid_status
      end
```

The pull request changed that code to call `map_status_to_value`, which returns
`'all'`. This in turn would be sent to `apply_name_filters` which would create
the condition `WHERE status = 'all'`, returning nothing. By explicitly returning
`nil` instead, no conditions on `status` are imposed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant