diff options
author | miloops <miloops@gmail.com> | 2008-12-02 11:16:48 -0300 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-12-02 15:27:16 +0100 |
commit | 2014d9141aaa8e40a030875de35570b1061b7c2f (patch) | |
tree | c7902341af3c386d0886010ddf7596f12f9b84e9 /activeresource | |
parent | bf024b6a11253b3d2599caf41f7ccf2d31e68cb3 (diff) | |
download | rails-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.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 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 |