aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
authormiloops <miloops@gmail.com>2008-12-02 11:16:48 -0300
committerMichael Koziarski <michael@koziarski.com>2008-12-02 15:27:16 +0100
commit2014d9141aaa8e40a030875de35570b1061b7c2f (patch)
treec7902341af3c386d0886010ddf7596f12f9b84e9 /activeresource
parentbf024b6a11253b3d2599caf41f7ccf2d31e68cb3 (diff)
downloadrails-2014d9141aaa8e40a030875de35570b1061b7c2f.tar.gz
rails-2014d9141aaa8e40a030875de35570b1061b7c2f.tar.bz2
rails-2014d9141aaa8e40a030875de35570b1061b7c2f.zip
Make new_record? an alias of new? in ActiveResource to fix problem with route generation in forms.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/base.rb1
1 files changed, 1 insertions, 0 deletions
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 <tt>\id</tt> attribute of the resource.
def id