Class: Hudu::AssetHelper
- Inherits:
-
Object
- Object
- Hudu::AssetHelper
- Defined in:
- lib/hudu/asset_helper.rb
Class Method Summary collapse
-
.construct_asset(asset) ⇒ Object
Construct asset for updates, assuem it is an entity.
Class Method Details
.construct_asset(asset) ⇒ Object
Construct asset for updates, assuem it is an entity
5 6 7 8 9 10 11 12 13 |
# File 'lib/hudu/asset_helper.rb', line 5 def self.construct_asset asset custom_asset = asset.attributes.slice( *%w( id company_id asset_layout_id slug name primary_serial primary_model primary_mail primary_manufacturer ) ) custom_asset['custom_fields'] = self.custom_fields(asset.fields) { asset: custom_asset } end |