Guest User

Untitled

a guest
Jun 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. class Response
  2.  
  3. attr_reader :errors
  4. attr_accessor :data
  5.  
  6. def initialize data=[]
  7. @data = []
  8. @data << data
  9. @data.flatten!
  10. @errors = ActiveModel::Errors.new(self)
  11. end
  12.  
  13. def self.human_attribute_name field, mappings
  14. mappings[:default]
  15. end
  16.  
  17. end
Add Comment
Please, Sign In to add comment