Votex v0.3.0 Votex.Voter View Source
Defines a Voter Model
A Voter model will expose the required methods to enable voting functionality Typically be used by models like User, Team, Organization etc.
Example
defmodule User do
use Ecto.Schema
use Votex.Voter
schema "users" do
field :name, :string
field :age, :integer, default: 20
end
end
Link to this section Summary
Functions
Reserved for internal use
Clean up votes after a voter record is deleted
Check if a votable record has been voted by a voter
Link to this section Functions
Reserved for internal use