Class: Preset

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/preset.rb

Class Method Summary collapse

Class Method Details

.from_api(attributes) ⇒ Object


9
10
11
12
13
14
# File 'app/models/preset.rb', line 9

def self.from_api(attributes)
  attributes = attributes[:preset] if attributes[:preset]
  create(name: attributes['name'],
         parameters: attributes['parameters'],
         thumbnail_options: attributes['thumbnail_options'])
end