Skip to content

Commit

Permalink
use absolute model references for :parent/:thumbnails associations. […
Browse files Browse the repository at this point in the history
…Ryan Kinderman]
  • Loading branch information
rick committed Apr 23, 2008
1 parent b9c5f79 commit acc6500
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/technoweenie/attachment_fu.rb
Expand Up @@ -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")
Expand Down

0 comments on commit acc6500

Please sign in to comment.