Permalink
Browse files

removing a useless alias

  • Loading branch information...
1 parent fd437ef commit 8f87463132912fd565735697ec994ce0ced489f6 @rich rich committed Apr 3, 2009
Showing with 4 additions and 20 deletions.
  1. +1 −9 lib/acts_as_revisable/acts/revisable.rb
  2. +3 −11 spec/find_spec.rb
@@ -432,15 +432,7 @@ def find(*args) #:nodoc:
super(*args)
end
end
-
- # Equivalent to:
- # find(..., :with_revisions => true)
- def find_with_revisions(*args)
- args << {} if args.grep(Hash).blank?
- args.grep(Hash).first.update({:with_revisions => true})
- find(*args)
- end
-
+
# Returns the +revision_class_name+ as configured in
# +acts_as_revisable+.
def revision_class_name #:nodoc:
View
@@ -18,21 +18,13 @@
it "should accept the :with_revisions options" do
lambda { Project.find(:all, :with_revisions => true) }.should_not raise_error
end
-
- it "should provide find_with_revisions" do
- lambda { Project.find_with_revisions(:all) }.should_not raise_error
- end
-
+
it "should find current and revisions with the :with_revisions option" do
Project.find(:all, :with_revisions => true).size.should == 2
end
-
- it "should find current and revisions with the find_with_revisions method" do
- Project.find_with_revisions(:all).size.should == 2
- end
-
+
it "should find revisions with conditions" do
- Project.find_with_revisions(:all, :conditions => {:name => "Rich"}).should == [@project1.find_revision(:previous)]
+ Project.find(:all, :conditions => {:name => "Rich"}, :with_revisions => true).should == [@project1.find_revision(:previous)]
end
end
end

0 comments on commit 8f87463

Please sign in to comment.