The local variable `collection` is unused. I would create a helper named `all_logics?` that returns the value. Your view should not depend on instance variables that is set in a helper method that is (not) called before. Calling methods helps you debugging because you get exceptions if a method does not exist. Non existing instance variables are just ignored, as you know.
```
helper_method :all_logics?
def all_logics?
  params[:all].present?
end
```
Please also rewrite `collection` to cache the result:
```
def collection
  @collection ||= begin
    if all_logics?
      super
    else
      ...
    end
  end
end
```