Permalink
Browse files

Check if connection responds to #support_extensions? before invoking it

  • Loading branch information...
1 parent a27761f commit 140bc244be3b621a875cb492335d0d4e3ecbe5d1 @vongruenigen vongruenigen committed Feb 7, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/postgres_ext/active_record/schema_dumper.rb
@@ -10,7 +10,8 @@ def self.valid_column_spec_keys
def dump(stream)
header(stream)
# added
- extensions(stream) if @connection.supports_extensions?
+ extensions(stream) if @connection.respond_to?(:supports_extensions?) &&
+ @connection.supports_extensions?
# /added
tables(stream)
trailer(stream)

0 comments on commit 140bc24

Please sign in to comment.