Class: BillerBotResource::Product::Context
- Inherits:
-
Resource
- Object
- ActiveResource::Base
- Resource
- BillerBotResource::Product::Context
- Defined in:
- lib/biller_bot_resource/product.rb
Instance Attribute Summary collapse
-
#product_id ⇒ Object
Returns the value of attribute product_id.
Instance Method Summary collapse
-
#force_persisted ⇒ Object
ActiveResource treats our nested models as non-persisted models.
- #prefix_options ⇒ Object
Methods inherited from Resource
#cache_key, config, configure, #initialize, instantiate_collection, query_string, #save
Constructor Details
This class inherits a constructor from BillerBotResource::Resource
Instance Attribute Details
#product_id ⇒ Object
Returns the value of attribute product_id.
6 7 8 |
# File 'lib/biller_bot_resource/product.rb', line 6 def product_id @product_id end |
Instance Method Details
#force_persisted ⇒ Object
ActiveResource treats our nested models as non-persisted models. We make this little hack so that the contexts can be loaded with the product, but saved independently.
16 17 18 |
# File 'lib/biller_bot_resource/product.rb', line 16 def force_persisted @persisted = true end |
#prefix_options ⇒ Object
8 9 10 |
# File 'lib/biller_bot_resource/product.rb', line 8 def { :product_id => product_id } end |