parent
4999b47b44
commit
79767f4bae
@ -0,0 +1,4 @@
|
||||
class UserActions < ActiveRecord::Base
|
||||
attr_accessible :action_id, :action_type, :user_id
|
||||
has_many :users
|
||||
end
|
@ -0,0 +1,11 @@
|
||||
class CreateUserActions < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :user_actions do |t|
|
||||
t.integer :user_id
|
||||
t.string :action_type
|
||||
t.integer :action_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,8 @@
|
||||
FactoryGirl.define do
|
||||
factory :user_action, :class => 'UserActions' do
|
||||
user_id 1
|
||||
action_type "MyString"
|
||||
action_id 1
|
||||
end
|
||||
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
require 'rails_helper'
|
||||
|
||||
RSpec.describe UserActions, :type => :model do
|
||||
pending "add some examples to (or delete) #{__FILE__}"
|
||||
end
|
Loading…
Reference in new issue