-
While testing helper methods that use image_tag
``` ruby
module SomeHelper
def using_image_tag
image_tag("rails.png")
end
end
```
the helper returns the image path starting with '/images' ev…
-
I have a decorator which looks like:
```
class FooDecorator < Draper::Decorator
def bar
h.fa_icon 'tag'
end
```
It works just fine when called either:
* As part of a web request,…
-
Because view helpers are dynamically included by Rails, Sorbet is not aware that the modules will be included into certain classes. We can solve this by generating RBIs that add the right `requires_an…
-
I'm using Draper 4.0.1 and I have these models:
```ruby
class Document < AR::Base; end;
class InputDocument < Document; end;
class OutputDocument < Document; end;
```
I also have a `Document…
-
My `test/minitest_helper.rb`:
``` ruby
ENV["RAILS_ENV"] = "test"
require File.expand_path('../../config/environment', __FILE__)
require "minitest/autorun"
require "minitest/rails"
# Add `gem "minit…
kirs updated
11 years ago
-
One use case that is immediately applicable would be the post show page. The post has the attribute `last_noted_at` , however this information is currently only available through the API. This infor…
-
Current spec generator requires 'spec_helper' while RSpec v3 requires 'rails_helper'
From [RSpec Rails GitHub](https://github.com/rspec/rspec-rails)
-
**Describe the solution you'd like**
In #2644, Execution Contexts were cleared, but did not go to fully wrapping specs with a Rails Executor. In the current version of Rails (7.1) TestCases l…
-
`Rack::Utils.bytesize` blows up if the master stylesheet is empty.
```
NoMethodError - undefined method `bytesize' for nil:NilClass:
rack (1.6.0) lib/rack/utils.rb:361:in `bytesize'
sprockets (2.…
brumm updated
9 years ago
-
Ruby version: 3.0.1
Rails version: 7.0.7
Sidekiq / Pro / Enterprise version(s): 7.1.3
sidekiq initializer:
```
require 'sidekiq'
require 'sidekiq-status'
# SIDEKIQ_STATUS_EXPIRATION = 48.ho…