Module: Shrine::Plugins::RemoteUrl::AttachmentMethods

Defined in:
lib/shrine/plugins/remote_url.rb

Instance Method Summary collapse

Instance Method Details

#define_model_methods(name) ⇒ Object


38
39
40
41
42
43
44
45
46
47
48
# File 'lib/shrine/plugins/remote_url.rb', line 38

def define_model_methods(name)
  super if defined?(super)

  define_method :"#{name}_remote_url=" do |url|
    send(:"#{name}_attacher").remote_url = url
  end

  define_method :"#{name}_remote_url" do
    send(:"#{name}_attacher").remote_url
  end
end