From 2014d9141aaa8e40a030875de35570b1061b7c2f Mon Sep 17 00:00:00 2001 From: miloops Date: Tue, 2 Dec 2008 11:16:48 -0300 Subject: Make new_record? an alias of new? in ActiveResource to fix problem with route generation in forms. Signed-off-by: Michael Koziarski --- activeresource/lib/active_resource/base.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index bb284803d8..ad9ae6df1f 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -704,6 +704,7 @@ module ActiveResource def new? id.nil? end + alias :new_record? :new? # Gets the \id attribute of the resource. def id -- cgit v1.2.3