Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ZohoOrder
- include ActiveModel::Model
- include ActiveModel::Validations::Callbacks
- ZohoFields = [
- 'ID',
- 'Added_Time'
- ]
- def self.converted_zoho_attributes
- ZohoFields.map do |attr|
- attr.downcase.to_sym
- end
- end
- attr_accessor *converted_zoho_attributes
- def added_time
- Time.strptime(super, Time::DATE_FORMATS[:zoho])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement