Module: FrozenRecord::Backends::Json
Instance Method Summary collapse
Instance Method Details
#filename(model_name) ⇒ Object
9 10 11 |
# File 'lib/frozen_record/backends/json.rb', line 9 def filename(model_name) "#{model_name.underscore.pluralize}.json" end |
#load(file_path) ⇒ Object
21 22 23 |
# File 'lib/frozen_record/backends/json.rb', line 21 def load(file_path) JSON.load_file(file_path, freeze: true) || Dedup::EMPTY_ARRAY end |