Skip to content

Commit

Permalink
Force string on owner_id
Browse files Browse the repository at this point in the history
  • Loading branch information
maurcs committed Mar 10, 2010
1 parent bb0e72d commit c1bbb16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/griddle/attachment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ def create_style_attachment style_name

attrs = attributes.merge({
:name => "#{name}/#{style_name}",
:owner_id => @attributes[:owner_id].to_s,
:styles => {}
})
self.class_eval do
Expand Down
1 change: 1 addition & 0 deletions test/has_attachment_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class HasAttachmentTest < Test::Unit::TestCase
should "have the correct dimensions for #{style[0]}" do
temp = Tempfile.new "#{style[0]}.jpg"
style_attachment = @document.image.send(style[0])

file_path = File.dirname(temp.path) + '/' + style_attachment.file_name
File.open(file_path, 'w') do |f|
f.write style_attachment.file.read
Expand Down

0 comments on commit c1bbb16

Please sign in to comment.