don't need sequenced

This commit is contained in:
Connor Turland 2016-03-27 00:14:22 -07:00
parent e4145ef9fb
commit a82b0048d8
3 changed files with 0 additions and 6 deletions

View file

@ -19,7 +19,6 @@ gem 'uservoice-ruby'
gem 'dotenv'
gem 'snorlax'
gem 'httparty'
gem 'sequenced', '~> 2.0.0'
gem 'active_model_serializers', '~> 0.8.1'
gem 'delayed_job', '~> 4.0.2'
gem 'delayed_job_active_record', '~> 4.0.1'

View file

@ -6,7 +6,6 @@ class Event < ActiveRecord::Base
belongs_to :map
belongs_to :user
scope :sequenced, -> { where('sequence_id is not null').order('sequence_id asc') }
scope :chronologically, -> { order('created_at asc') }
after_create :notify_webhooks!, if: :map
@ -14,8 +13,6 @@ class Event < ActiveRecord::Base
validates_inclusion_of :kind, :in => KINDS
validates_presence_of :eventable
acts_as_sequenced scope: :map_id, column: :sequence_id, skip: lambda {|e| e.map.nil? || e.map_id.nil? }
#def notify!(user)
# notifications.create!(user: user)
#end

View file

@ -5,9 +5,7 @@ class CreateEvents < ActiveRecord::Migration
t.references :eventable, polymorphic: true, index: true
t.references :user, index: true
t.references :map, index: true
t.integer :sequence_id, index: true, default: nil, null: true
t.timestamps
end
add_index :events, [:map_id, :sequence_id], unique: true
end
end