Skip to content

Commit

Permalink
Allow ActiveRecord 4
Browse files Browse the repository at this point in the history
  • Loading branch information
janko committed Jun 26, 2013
1 parent a4159c8 commit d4a11cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sinatra/activerecord.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def self.registered(app)
app.helpers ActiveRecordHelper

# re-connect if database connection dropped
app.before { ActiveRecord::Base.verify_active_connections! }
app.before { ActiveRecord::Base.verify_active_connections! if ActiveRecord::Base.respond_to?(:verify_active_connections!) }
app.after { ActiveRecord::Base.clear_active_connections! }
end

Expand Down
2 changes: 1 addition & 1 deletion sinatra-activerecord.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Gem::Specification.new do |gem|
gem.required_ruby_version = ">= 1.9.2"

gem.add_dependency "sinatra", "~> 1.0"
gem.add_dependency "activerecord", "~> 3.0"
gem.add_dependency "activerecord", ">= 3.0"

gem.add_development_dependency "rake"
gem.add_development_dependency "rspec", ">= 2.10"
Expand Down

0 comments on commit d4a11cd

Please sign in to comment.