SHARE
TWEET

Untitled

a guest Sep 20th, 2019 885 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class ZohoOrder
  2.   include ActiveModel::Model
  3.   include ActiveModel::Validations::Callbacks
  4.  
  5.   ZohoFields = [
  6.     'ID',
  7.     'Added_Time'
  8.   ]
  9.  
  10.   def self.converted_zoho_attributes
  11.     ZohoFields.map do |attr|
  12.       attr.downcase.to_sym
  13.     end
  14.   end
  15.  
  16.   attr_accessor *converted_zoho_attributes
  17.  
  18.   def added_time
  19.     Time.strptime(super, Time::DATE_FORMATS[:zoho])
  20.   end
  21. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top