Almost usable, still a lot of work left

-Moved bikes to User model instead of profile
-User can copy user log to a bike log with new actsasloggable
-Added user stats
-some css was messing up checkboxes, need to figure out which stylesheet was doing that
This commit is contained in:
Jason Denney
2012-12-31 15:38:34 -05:00
parent 922af526c1
commit 189137ba9d
15 changed files with 117 additions and 17 deletions
@@ -19,8 +19,6 @@ class DeviseCreateUsers < ActiveRecord::Migration
t.string :current_sign_in_ip
t.string :last_sign_in_ip
t.integer :user_role_id
## Encryptable
# t.string :password_salt
@@ -39,6 +37,11 @@ class DeviseCreateUsers < ActiveRecord::Migration
# t.string :authentication_token
#I need to move these elsewhere eventually
t.integer :user_role_id, :null => false, :default => 1
#one bike per user for now
t.integer :bike_id
t.timestamps
end
@@ -47,5 +50,7 @@ class DeviseCreateUsers < ActiveRecord::Migration
# add_index :users, :confirmation_token, :unique => true
# add_index :users, :unlock_token, :unique => true
# add_index :users, :authentication_token, :unique => true
add_index :users, :bike_id, :unique => true
end
end
+2
View File
@@ -14,5 +14,7 @@ class CreateBike < ActiveRecord::Migration
t.integer "bike_status_id", :null => false
t.timestamps
end
add_index :bikes, :serial_number, :unique => true
end
end
@@ -2,7 +2,6 @@ class CreateUserProfile < ActiveRecord::Migration
def change
create_table :user_profiles do |t|
t.integer "user_id", :null => false
t.integer "bike_id"
t.string "first_name"
t.string "last_name"
t.string "addrStreet1"