Class: ActiveResource::Base
- Inherits:
-
Object
- Object
- ActiveResource::Base
- Defined in:
- lib/active_resource/find_as_hashes.rb
Class Method Summary collapse
- .all_as_hashes(*args) ⇒ Object
- .find_as_hashes(*args) ⇒ Object
- .first_as_hash(*args) ⇒ Object
- .instantiate_collection_with_check(collection, original_params = {}, prefix_options = {}) ⇒ Object (also: instantiate_collection)
- .last_as_hash(*args) ⇒ Object
Class Method Details
.all_as_hashes(*args) ⇒ Object
12 13 14 |
# File 'lib/active_resource/find_as_hashes.rb', line 12 def all_as_hashes(*args) find_as_hashes(:all, *args) end |
.find_as_hashes(*args) ⇒ Object
7 8 9 10 |
# File 'lib/active_resource/find_as_hashes.rb', line 7 def find_as_hashes(*args) @skip_instantiate = true find(*args) end |
.first_as_hash(*args) ⇒ Object
16 17 18 |
# File 'lib/active_resource/find_as_hashes.rb', line 16 def first_as_hash(*args) find_as_hashes(:first, *args) end |
.instantiate_collection_with_check(collection, original_params = {}, prefix_options = {}) ⇒ Object Also known as: instantiate_collection
24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/active_resource/find_as_hashes.rb', line 24 def instantiate_collection_with_check(collection, original_params = {}, = {}) if @skip_instantiate @skip_instantiate = nil collection else if ActiveResource::VERSION::MAJOR >= 4 instantiate_collection_without_check(collection, original_params, ) else instantiate_collection_without_check(collection, ) end end end |
.last_as_hash(*args) ⇒ Object
20 21 22 |
# File 'lib/active_resource/find_as_hashes.rb', line 20 def last_as_hash(*args) find_as_hashes(:last, *args) end |