metamaps--metamaps/app/models/star.rb
Devin Howard d193c9a53c add starred to maps API (#719)
* add starred to maps API and endpoint to create/delete

* add token to requests without token param

* add minor version number to api version

* metacode/user use uri in schema

* make code climate happier
2016-10-05 10:36:03 -04:00

6 lines
196 B
Ruby

# frozen_string_literal: true
class Star < ActiveRecord::Base
belongs_to :user
belongs_to :map
validates :map, uniqueness: { scope: :user, message: 'You have already starred this map' }
end