Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use absolute model references for :parent/:thumbnails associations. […

…Ryan Kinderman]
  • Loading branch information...
commit acc65000e578686268ab75fae5a9af4751de00c1 1 parent b9c5f79
rick authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/technoweenie/attachment_fu.rb
View
4 lib/technoweenie/attachment_fu.rb
@@ -70,8 +70,8 @@ def has_attachment(options = {})
attachment_options[:path_prefix] = attachment_options[:path_prefix][1..-1] if options[:path_prefix].first == '/'
with_options :foreign_key => 'parent_id' do |m|
- m.has_many :thumbnails, :class_name => attachment_options[:thumbnail_class].to_s
- m.belongs_to :parent, :class_name => base_class.to_s unless options[:thumbnails].empty?
+ m.has_many :thumbnails, :class_name => "::#{attachment_options[:thumbnail_class]}"
+ m.belongs_to :parent, :class_name => "::#{base_class}" unless options[:thumbnails].empty?
end
storage_mod = Technoweenie::AttachmentFu::Backends.const_get("#{options[:storage].to_s.classify}Backend")
Please sign in to comment.
Something went wrong with that request. Please try again.