From 3df2f63345c41d6e02361b4064e724349cfc9783 Mon Sep 17 00:00:00 2001 From: miloops Date: Tue, 2 Dec 2008 11:16:48 -0300 Subject: [PATCH] Make new_record? an alias of new? in ActiveResource to fix problem with route generation in forms. --- activeresource/lib/active_resource/base.rb | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index bb28480..ad9ae6d 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 -- 1.5.5.1