Created
December 2, 2021 00:56
-
-
Save lunaisnotaboy/c0d699d92c83c8af9aa3e9d8ee865398 to your computer and use it in GitHub Desktop.
Revisions
-
lunaisnotaboy created this gist
Dec 2, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,3 @@ # Shrine `NoMethodError` Issue This gist contains all the files relevant to the issue. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ # frozen_string_literal: true class ImageUploader < Shrine # There's actually stuff in here in the actual file, but most of it is sensitive. # Rest assured, *nothing* in here is causing the problem. end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ <!-- Just the image tag --> <%= image_tag Topic.find(1).icon_url %> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ # frozen_string_literal: true # == Schema Information # # Table name: topics # # id :bigint not null, primary key # description :text default(""), not null # icon_data :text # name :string default(""), not null # created_at :datetime not null # updated_at :datetime not null # class Topic < ApplicationRecord include TopicIconUploader::Attachment(:icon) end This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # frozen_string_literal: true class TopicIconUploader < ImageUploader # Again, since this code is sensitive, this is as much as I can give you. Apologies. plugin :default_url Attacher.default_url do |**_options| '/images/icons/topic.png' end end