method
new?
v2.1.0 -
Show latest stable
-
2 notes -
Class: ActiveResource::Base
- 1.0.0
- 1.1.0
- 1.1.1
- 1.1.6
- 1.2.0
- 1.2.6
- 2.0.0 (0)
- 2.0.1 (0)
- 2.0.3 (0)
- 2.1.0 (-16)
- 2.2.1 (1)
- 2.3.2 (0)
- 2.3.8 (0)
- 3.0.0 (-38)
- 3.0.5 (0)
- 3.0.7 (0)
- 3.0.9 (-29)
- 3.1.0 (0)
- 3.2.1 (0)
- 3.2.3 (0)
- 3.2.8 (0)
- 3.2.13 (0)
- What's this?
new?()
public
A method to determine if the resource a new object (i.e., it has not been POSTed to the remote service yet).
Examples
not_new = Computer.create(:brand => 'Apple', :make => 'MacBook', :vendor => 'MacMall') not_new.new? # => false is_new = Computer.new(:brand => 'IBM', :make => 'Thinkpad', :vendor => 'IBM') is_new.new? # => true is_new.save is_new.new? # => false
Register or
log in
to add new notes.
rafaelrosafu -
December 3, 2008 - (v2.2.1)
gdelfino -
April 21, 2009
5 thanks
Method doesn't exists
Don’t confuse it with new_record? in ActiveRecord
4 thanks
Corrected link to ActiveRecord's "new_record?" method
rafaelrosafu, the correct tink to ActiveRecord’s “new_record?” method is:
"http://apidock.com/rails/ActiveRecord/Base/new_record%3F"


