jam-cloud/ruby/lib/jam_ruby/models/app_interaction.rb

15 lines
334 B
Ruby

module JamRuby
class AppInteraction < ActiveRecord::Base
self.primary_key = 'id'
self.table_name = 'app_interactions'
ACTIONS = %w(page:enter page:exit)
CLIENTS = %w(browser client)
validates :action, inclusion: { in: ACTIONS }
validates :client, inclusion: { in: CLIENTS }
belongs_to :user
end
end