follow/followings fixes, general cleanups

This commit is contained in:
Kyle Drake 2014-05-19 18:31:46 +02:00
parent ad9ac1e68d
commit 264e4becea
6 changed files with 41 additions and 24 deletions

View file

@ -1,3 +1,12 @@
class Tag < Sequel::Model
many_to_many :sites
end
def before_create
super
values[:name].downcase!
end
def self.create_unless_exists(name)
dataset.filter(name: name).first || create(name: name)
end
end