Remove admins

This commit is contained in:
Benjamin Cousaert 2014-12-09 13:10:15 +01:00
parent 6305d3327a
commit a52f74d1a1
6 changed files with 1 additions and 57 deletions

View file

@ -1,3 +0,0 @@
class Admin < ActiveRecord::Base
devise :database_authenticatable, :trackable
end

View file

@ -1,6 +1,5 @@
Rails.application.routes.draw do Rails.application.routes.draw do
devise_for :admins
root "orders#overview" root "orders#overview"
resources :users do resources :users do

View file

@ -1,20 +0,0 @@
class DeviseCreateAdmins < ActiveRecord::Migration
def change
create_table(:admins) do |t|
## Database authenticatable
t.string :email, null: false, default: ""
t.string :encrypted_password, null: false, default: ""
## Trackable
t.integer :sign_in_count, default: 0, null: false
t.datetime :current_sign_in_at
t.datetime :last_sign_in_at
t.string :current_sign_in_ip
t.string :last_sign_in_ip
t.timestamps
end
add_index :admins, :email, unique: true
end
end

View file

@ -11,21 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141208200510) do ActiveRecord::Schema.define(version: 20141208160113) do
create_table "admins", force: true do |t|
t.string "email", default: "", null: false
t.string "encrypted_password", default: "", null: false
t.integer "sign_in_count", default: 0, null: false
t.datetime "current_sign_in_at"
t.datetime "last_sign_in_at"
t.string "current_sign_in_ip"
t.string "last_sign_in_ip"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "admins", ["email"], name: "index_admins_on_email", unique: true
create_table "order_products", force: true do |t| create_table "order_products", force: true do |t|
t.integer "order_id" t.integer "order_id"

View file

@ -1,11 +0,0 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the '{}' from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
one: {}
# column: value
#
two: {}
# column: value

View file

@ -1,7 +0,0 @@
require 'test_helper'
class AdminTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end