Skip to content

Commit

Permalink
Merge pull request #53 from jashmenn/revert-51-feature/fix_array_type…
Browse files Browse the repository at this point in the history
…_cast

Revert "Fix PostgreSQL array type casting(ArgumentError: wrong number of...
  • Loading branch information
pyromaniac committed Jan 11, 2015
2 parents 5259314 + 0160ea8 commit 29778c6
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
4 changes: 2 additions & 2 deletions lib/activeuuid/patches.rb
Expand Up @@ -122,10 +122,10 @@ def quote_with_visiting(value, column = nil)
quote_without_visiting(value, column)
end

def type_cast_with_visiting(value, column = nil, *args)
def type_cast_with_visiting(value, column = nil)
value = UUIDTools::UUID.serialize(value) if column && column.type == :uuid
value = value.to_s if value.is_a? UUIDTools::UUID
type_cast_without_visiting(value, column, *args)
type_cast_without_visiting(value, column)
end

def native_database_types_with_pguuid
Expand Down
12 changes: 0 additions & 12 deletions spec/lib/activerecord_spec.rb
Expand Up @@ -88,18 +88,6 @@
its(:delete) { should be_truthy }
its(:destroy) { should be_truthy }
end

context '#save' do
subject { article }
let(:array) { [1, 2, 3] }

its(:save) { should be_truthy }

context 'when change array field' do
before { article.some_array = array }
its(:save) { should be_truthy }
end
end
end

describe UuidArticle do
Expand Down
5 changes: 0 additions & 5 deletions spec/support/migrate/20141017204945_add_array_to_articles.rb

This file was deleted.

0 comments on commit 29778c6

Please sign in to comment.