Add authentication and User model
* Add User model * Add SessionsController * Add password authentication on User * Request authentication for all actions except sign in * Add some helpers for ApplicationController * Update features to work with mandatory authentication
This commit is contained in:
14
db/migrate/20110805201426_create_users.rb
Normal file
14
db/migrate/20110805201426_create_users.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateUsers < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :users do |t|
|
||||
t.string :email
|
||||
t.string :password
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :users
|
||||
end
|
||||
end
|
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(:version => 20110804225816) do
|
||||
ActiveRecord::Schema.define(:version => 20110805201426) do
|
||||
|
||||
create_table "playlists", :force => true do |t|
|
||||
t.string "name"
|
||||
@@ -36,4 +36,11 @@ ActiveRecord::Schema.define(:version => 20110804225816) do
|
||||
t.string "sha256"
|
||||
end
|
||||
|
||||
create_table "users", :force => true do |t|
|
||||
t.string "email"
|
||||
t.string "password"
|
||||
t.datetime "created_at"
|
||||
t.datetime "updated_at"
|
||||
end
|
||||
|
||||
end
|
||||
|
Reference in New Issue
Block a user