Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Making sure we support ActiveRecord 3.1.

  • Loading branch information...
commit 337942c9d5076e15df38069340cdf25a0d5e1862 1 parent 68fecec
@flavorjones flavorjones authored
Showing with 15 additions and 1 deletion.
  1. +8 −0 Gemfile-3.1
  2. +5 −1 spec/acts_as_fu_spec.rb
  3. +2 −0  spec/spec_helper.rb
View
8 Gemfile-3.1
@@ -0,0 +1,8 @@
+source :gemcutter
+
+gem "activerecord", "3.1.0"
+gem "sqlite3-ruby"
+
+group :development do
+ gem "rspec", "~>1"
+end
View
6 spec/acts_as_fu_spec.rb
@@ -100,7 +100,11 @@ class << Foo; attr_reader :bar end
string :type
string :name
- named_scope :pictures, :conditions => { :type => "Picture" }
+ if ActiveRecord::VERSION::MAJOR < 3
+ named_scope :pictures, :conditions => { :type => "Picture" }
+ else
+ scope :pictures, :conditions => { :type => "Picture" }
+ end
end
build_model(:pictures, :superclass => Asset)
View
2  spec/spec_helper.rb
@@ -3,3 +3,5 @@
require 'acts_as_fu'
require 'rubygems'
require 'spec'
+require 'active_record'
+require 'active_record/version'
Please sign in to comment.
Something went wrong with that request. Please try again.