```ruby
module GalleriesHelper
  def writable?
    !(@gallery.read_only && !@boss_token)
  end
end
```

Enable use of "writable?" helper without gallery set.
user
```ruby
module GalleriesHelper
  def writable?
    @gallery && !(@gallery.read_only && !@boss_token)
  end
end
```
assistant