We need to use File.open(Rails.root.join("<image_path>"))
.
File.open(Rails.root.join("test/fixtures/files/sample.jpeg"))
inherit_from: ../.rubocop.yml | |
# Checks if uses of quotes match the configured preference. | |
Style/StringLiterals: | |
Enabled: false | |
# group.rb
# When we pass NULL to LIMIT, Postgres treats it as LIMIT ALL (no limit).
# https://www.postgresql.org/docs/current/static/sql-select.html#SQL-LIMIT
def topics_prioritized(normal_topics_limit: nil)
ids = topic_ids(normal_topics_limit)
# frozen_string_literal: true | |
class ObjectNameDecorator < SimpleDelegator | |
delegate :class, :is_a?, to: :__getobj__ | |
def self.collection(objects) | |
objects.map { |group| ObjectNameDecorator.new(object) } | |
end | |
private |