rswag/test-app/app/models/blog.rb
Jay Danielian 297cc447c8 Gets v3 request example saving as well as response example saving
Adds rubocop to the gemset

adds guard to the gemset for testing
2019-07-05 15:59:47 -04:00

15 lines
232 B
Ruby

# frozen_string_literal: true
class Blog < ActiveRecord::Base
validates :content, presence: true
def as_json(_options)
{
id: id,
title: title,
content: content,
thumbnail: thumbnail
}
end
end