alchemy_cms 2.5.0.b9 → 2.5.0.rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/alchemy_cms.gemspec +2 -1
- data/app/assets/javascripts/alchemy/alchemy.base.js +0 -27
- data/app/assets/javascripts/alchemy/alchemy.growler.js +1 -1
- data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -1
- data/app/assets/javascripts/alchemy/alchemy.onload.js.coffee +0 -4
- data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +0 -1
- data/app/assets/stylesheets/alchemy/admin.css.scss +1 -0
- data/app/assets/stylesheets/alchemy/archive.scss +8 -6
- data/app/assets/stylesheets/alchemy/base.scss +3 -92
- data/app/assets/stylesheets/alchemy/elements.scss +2 -2
- data/app/assets/stylesheets/alchemy/flash.scss +16 -12
- data/app/assets/stylesheets/alchemy/frame.scss +10 -5
- data/app/assets/stylesheets/alchemy/icons.scss +2 -2
- data/app/assets/stylesheets/alchemy/pagination.scss +5 -5
- data/app/assets/stylesheets/alchemy/tables.scss +2 -2
- data/app/assets/stylesheets/alchemy/toolbar.scss +79 -0
- data/app/controllers/alchemy/admin/base_controller.rb +3 -2
- data/app/controllers/alchemy/admin/dashboard_controller.rb +1 -1
- data/app/controllers/alchemy/admin/pictures_controller.rb +1 -1
- data/app/controllers/alchemy/admin/users_controller.rb +8 -2
- data/app/controllers/alchemy/attachments_controller.rb +1 -1
- data/app/controllers/alchemy/base_controller.rb +8 -0
- data/app/controllers/alchemy/pages_controller.rb +4 -0
- data/app/controllers/alchemy/passwords_controller.rb +23 -0
- data/app/controllers/alchemy/user_sessions_controller.rb +20 -49
- data/app/controllers/alchemy/users_controller.rb +49 -0
- data/app/mailers/alchemy/notifications.rb +5 -0
- data/app/models/alchemy/content.rb +6 -2
- data/app/models/alchemy/element.rb +9 -5
- data/app/models/alchemy/essence_richtext.rb +28 -16
- data/app/models/alchemy/essence_text.rb +22 -13
- data/app/models/alchemy/message.rb +1 -1
- data/app/models/alchemy/page.rb +7 -2
- data/app/models/alchemy/user.rb +66 -24
- data/app/views/alchemy/admin/dashboard/index.html.erb +1 -1
- data/app/views/alchemy/admin/essence_files/edit.html.erb +1 -0
- data/app/views/alchemy/admin/pages/_create_language_form.html.erb +8 -1
- data/app/views/alchemy/admin/partials/_flash.html.erb +1 -1
- data/app/views/alchemy/admin/users/_table.html.erb +2 -2
- data/app/views/alchemy/admin/users/_user.html.erb +1 -1
- data/app/views/alchemy/admin/users/index.html.erb +1 -1
- data/app/views/alchemy/notifications/admin_user_created.de.text.erb +11 -0
- data/app/views/alchemy/notifications/admin_user_created.en.text.erb +11 -0
- data/app/views/alchemy/notifications/registered_user_created.text.erb +2 -1
- data/app/views/alchemy/notifications/reset_password_instructions.de.text.erb +8 -0
- data/app/views/alchemy/notifications/reset_password_instructions.en.text.erb +8 -0
- data/app/views/alchemy/passwords/edit.html.erb +35 -0
- data/app/views/alchemy/passwords/new.html.erb +30 -0
- data/app/views/alchemy/user_sessions/leave.html.erb +3 -3
- data/app/views/alchemy/user_sessions/{login.html.erb → new.html.erb} +5 -2
- data/app/views/alchemy/{user_sessions/signup.html.erb → users/new.html.erb} +0 -0
- data/config/alchemy/config.yml +12 -0
- data/config/initializers/devise.rb +242 -0
- data/config/locales/alchemy.de.yml +12 -39
- data/config/locales/alchemy.en.yml +4 -31
- data/config/locales/devise.de.yml +57 -0
- data/config/locales/devise.en.yml +60 -0
- data/config/routes.rb +37 -21
- data/db/migrate/20130121092645_migrate_to_devise.rb +24 -0
- data/lib/alchemy/authentication_helpers.rb +0 -13
- data/lib/alchemy/engine.rb +2 -2
- data/lib/alchemy/essence.rb +2 -2
- data/lib/alchemy/upgrader.rb +33 -0
- data/lib/alchemy/version.rb +1 -1
- data/lib/alchemy_cms.rb +2 -1
- data/lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt +1 -1
- data/lib/rails/generators/alchemy/devise/devise_generator.rb +24 -0
- data/lib/rails/generators/alchemy/scaffold/files/elements.yml +1 -111
- data/lib/rails/generators/alchemy/scaffold/templates/page_layouts.yml.tt +1 -27
- data/lib/tasks/ferret.rake +6 -6
- data/spec/controllers/admin/clipboard_controller_spec.rb +2 -3
- data/spec/controllers/admin/contents_controller_spec.rb +1 -2
- data/spec/controllers/admin/elements_controller_spec.rb +1 -2
- data/spec/controllers/admin/languages_controller_spec.rb +2 -3
- data/spec/controllers/admin/pages_controller_spec.rb +2 -3
- data/spec/controllers/admin/trash_controller_spec.rb +1 -2
- data/spec/controllers/admin/users_controller_spec.rb +36 -5
- data/spec/controllers/attachments_controller_spec.rb +2 -4
- data/spec/controllers/base_controller_spec.rb +25 -0
- data/spec/controllers/elements_controller_spec.rb +1 -2
- data/spec/controllers/passwords_controller_spec.rb +16 -0
- data/spec/controllers/pictures_controller_spec.rb +1 -2
- data/spec/controllers/user_sessions_controller_spec.rb +21 -0
- data/spec/controllers/users_controller_spec.rb +67 -0
- data/spec/dummy/db/migrate/20130121092645_migrate_to_devise.rb +24 -0
- data/spec/dummy/db/schema.rb +17 -16
- data/spec/factories.rb +2 -0
- data/spec/integration/pages_controller_spec.rb +9 -1
- data/spec/models/content_spec.rb +11 -0
- data/spec/models/element_spec.rb +11 -2
- data/spec/models/essence_richtext_spec.rb +42 -6
- data/spec/models/essence_text_spec.rb +41 -0
- data/spec/models/page_spec.rb +39 -0
- data/spec/models/user_spec.rb +95 -6
- data/spec/spec_helper.rb +2 -3
- data/spec/support/alchemy/controller_hacks.rb +1 -1
- data/spec/support/alchemy/specs_helpers.rb +4 -4
- metadata +47 -10
- data/app/models/alchemy/user_session.rb +0 -14
- data/app/views/alchemy/notifications/admin_user_created.text.erb +0 -13
- data/app/views/alchemy/user_sessions/logout.html.erb +0 -3
|
@@ -1,32 +1,6 @@
|
|
|
1
1
|
# == This file defines the page_layouts for new pages.
|
|
2
|
-
#
|
|
3
|
-
# Please make your own page_layouts for your app in your own Rails.root/config/alchemy/page_layouts.yml file.
|
|
4
2
|
#
|
|
5
|
-
#
|
|
6
|
-
# - name: String # The name of the layout used for views and inside the database. You can render a layout with the render_page_layout(name) helper.
|
|
7
|
-
# unique: Bool # Pass true and the user can only choose this layout once inside a language tree.
|
|
8
|
-
# hide: Bool # Pass true to hide this layout from the user.
|
|
9
|
-
# elements: Array # A list of element names that can be placed on this layout i.e. [text, picture]. Elements are defined inside the elements.yml file.
|
|
10
|
-
# autogenerate: Array # A list of element names that are autogenerated after creating the Page.
|
|
11
|
-
# layoutpage: Bool # Layoutpages are outside the normal pagetree and can be used to place "global" language independent Elements.
|
|
12
|
-
# cache: Bool # Pass false to disable the caching for this pages.
|
|
13
|
-
# feed: Bool # Pass true to enable a RSS feed of news elements from this page.
|
|
14
|
-
# redirects_to_external: Bool # Pass true to disable normal page rendering and redirect to a external page instead.
|
|
15
|
-
# controller: controller_name # Controller to use instead of the default PagesController
|
|
16
|
-
# action: action_name # Controllers action to use instead of the default PagesController#show
|
|
17
|
-
#
|
|
18
|
-
# === Translate page layout names
|
|
19
|
-
#
|
|
20
|
-
# Page layout names are passed through the I18n library. So you can translate them in your config/locales language yml file.
|
|
21
|
-
#
|
|
22
|
-
# Example:
|
|
23
|
-
#
|
|
24
|
-
# de:
|
|
25
|
-
# alchemy:
|
|
26
|
-
# page_layout_names:
|
|
27
|
-
# contact: Kontakt
|
|
28
|
-
# search: Suche
|
|
29
|
-
#
|
|
3
|
+
# For further informations please see http://guides.alchemy-cms.com/create_page_layouts.html
|
|
30
4
|
|
|
31
5
|
- name: <%= Alchemy::Config.get(:default_language)['page_layout'] %>
|
|
32
6
|
unique: true
|
data/lib/tasks/ferret.rake
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
namespace :ferret do
|
|
2
2
|
|
|
3
|
-
desc "Updates the
|
|
3
|
+
desc "Updates the Ferret index."
|
|
4
4
|
task :rebuild_index => :environment do
|
|
5
|
-
puts "Rebuilding Ferret
|
|
6
|
-
Alchemy::EssenceText.rebuild_index
|
|
7
|
-
puts "Rebuilding Ferret
|
|
8
|
-
Alchemy::EssenceRichtext.rebuild_index
|
|
9
|
-
puts "Completed Ferret
|
|
5
|
+
puts "Rebuilding Ferret index for EssenceText"
|
|
6
|
+
Alchemy::EssenceText.where(:do_not_index => false).rebuild_index
|
|
7
|
+
puts "Rebuilding Ferret index for EssenceRichtext"
|
|
8
|
+
Alchemy::EssenceRichtext.where(:do_not_index => false).rebuild_index
|
|
9
|
+
puts "Completed Ferret index rebuild"
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
end
|
|
@@ -7,9 +7,8 @@ module Alchemy
|
|
|
7
7
|
let(:element) { FactoryGirl.create(:element, :page => page) }
|
|
8
8
|
let(:another_element) { FactoryGirl.create(:element, :page => page) }
|
|
9
9
|
|
|
10
|
-
before
|
|
11
|
-
|
|
12
|
-
UserSession.create(FactoryGirl.create(:admin_user))
|
|
10
|
+
before do
|
|
11
|
+
sign_in :user, FactoryGirl.create(:admin_user)
|
|
13
12
|
session[:clipboard] = Clipboard.new
|
|
14
13
|
end
|
|
15
14
|
|
|
@@ -4,8 +4,7 @@ module Alchemy
|
|
|
4
4
|
describe Admin::ElementsController do
|
|
5
5
|
|
|
6
6
|
before(:each) do
|
|
7
|
-
|
|
8
|
-
Alchemy::UserSession.create FactoryGirl.create(:admin_user)
|
|
7
|
+
sign_in :user, FactoryGirl.create(:admin_user)
|
|
9
8
|
end
|
|
10
9
|
|
|
11
10
|
let(:page) { FactoryGirl.create(:page, :urlname => 'lulu') }
|
|
@@ -3,9 +3,8 @@ require 'spec_helper'
|
|
|
3
3
|
module Alchemy
|
|
4
4
|
describe Admin::PagesController do
|
|
5
5
|
|
|
6
|
-
before
|
|
7
|
-
|
|
8
|
-
UserSession.create FactoryGirl.create(:admin_user)
|
|
6
|
+
before do
|
|
7
|
+
sign_in :user, FactoryGirl.create(:admin_user)
|
|
9
8
|
end
|
|
10
9
|
|
|
11
10
|
describe "#flush" do
|
|
@@ -7,13 +7,44 @@ describe Alchemy::Admin::UsersController do
|
|
|
7
7
|
let!(:user) { FactoryGirl.create(:admin_user) }
|
|
8
8
|
|
|
9
9
|
before do
|
|
10
|
-
|
|
11
|
-
Alchemy::UserSession.create user
|
|
10
|
+
sign_in :user, user
|
|
12
11
|
end
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
describe '#update' do
|
|
14
|
+
before { ActionMailer::Base.deliveries = [] }
|
|
15
|
+
|
|
16
|
+
it "assigns user to @user" do
|
|
17
|
+
post :update, :id => user.id, :user => {}, :format => :js
|
|
18
|
+
assigns(:user).should eq(user)
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
context "with empty password passed" do
|
|
22
|
+
it "should update the user" do
|
|
23
|
+
post :update, :id => user.id, :user => {:firstname => 'Johnny', :password => '', :password_confirmation => ''}, :format => :js
|
|
24
|
+
assigns(:user).should be_valid
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
context "with new password passed" do
|
|
29
|
+
it "should update the user" do
|
|
30
|
+
post :update, :id => user.id, :user => {:firstname => 'Johnny', :password => 'newpassword', :password_confirmation => 'newpassword'}, :format => :js
|
|
31
|
+
assigns(:user).password.should == 'newpassword'
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
context "with send_credentials set to true" do
|
|
36
|
+
it "should send an email notification" do
|
|
37
|
+
post :update, :id => user.id, :send_credentials => true, :user => {}
|
|
38
|
+
ActionMailer::Base.deliveries.should_not be_empty
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
context "with send_credentials left blank" do
|
|
43
|
+
it "should not send an email notification" do
|
|
44
|
+
post :update, :id => user.id, :user => {}
|
|
45
|
+
ActionMailer::Base.deliveries.should be_empty
|
|
46
|
+
end
|
|
47
|
+
end
|
|
17
48
|
end
|
|
18
49
|
|
|
19
50
|
context "if user is permitted to update roles" do
|
|
@@ -27,8 +27,7 @@ module Alchemy
|
|
|
27
27
|
context "as registered user" do
|
|
28
28
|
|
|
29
29
|
before do
|
|
30
|
-
|
|
31
|
-
UserSession.create(FactoryGirl.create(:registered_user))
|
|
30
|
+
sign_in :user, FactoryGirl.create(:registered_user)
|
|
32
31
|
end
|
|
33
32
|
|
|
34
33
|
it "should be possible to download attachments from restricted pages" do
|
|
@@ -47,8 +46,7 @@ module Alchemy
|
|
|
47
46
|
context "as registered user" do
|
|
48
47
|
|
|
49
48
|
before do
|
|
50
|
-
|
|
51
|
-
UserSession.create(FactoryGirl.create(:registered_user))
|
|
49
|
+
sign_in :user, FactoryGirl.create(:registered_user)
|
|
52
50
|
end
|
|
53
51
|
|
|
54
52
|
it "should be possible to see attachments from restricted pages" do
|
|
@@ -95,5 +95,30 @@ module Alchemy
|
|
|
95
95
|
|
|
96
96
|
end
|
|
97
97
|
|
|
98
|
+
describe '#store_user_request_time' do
|
|
99
|
+
|
|
100
|
+
context "user not logged in" do
|
|
101
|
+
before { controller.stub!(:user_signed_in?).and_return(false) }
|
|
102
|
+
|
|
103
|
+
it "should not store the current request time" do
|
|
104
|
+
controller.send(:store_user_request_time).should == nil
|
|
105
|
+
end
|
|
106
|
+
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
context "user logged in" do
|
|
110
|
+
before do
|
|
111
|
+
controller.stub!(:user_signed_in?).and_return(true)
|
|
112
|
+
controller.stub!(:current_user).and_return(FactoryGirl.create(:user))
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
it "should not store the current request time" do
|
|
116
|
+
controller.send(:store_user_request_time).should == true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
end
|
|
122
|
+
|
|
98
123
|
end
|
|
99
124
|
end
|
|
@@ -33,8 +33,7 @@ module Alchemy
|
|
|
33
33
|
|
|
34
34
|
context "for registered user" do
|
|
35
35
|
before do
|
|
36
|
-
|
|
37
|
-
UserSession.create(FactoryGirl.create(:registered_user))
|
|
36
|
+
sign_in :user, FactoryGirl.create(:registered_user)
|
|
38
37
|
end
|
|
39
38
|
|
|
40
39
|
it "should render elements of restricted pages" do
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
require "spec_helper"
|
|
2
|
+
|
|
3
|
+
module Alchemy
|
|
4
|
+
describe PasswordsController do
|
|
5
|
+
let(:user) { FactoryGirl.create(:admin_user) }
|
|
6
|
+
|
|
7
|
+
describe '#post' do
|
|
8
|
+
it "should send email with reset password instructions" do
|
|
9
|
+
ActionMailer::Base.deliveries = []
|
|
10
|
+
@request.env["devise.mapping"] = Devise.mappings[:user]
|
|
11
|
+
post :create, :user => {:email => user.email}
|
|
12
|
+
ActionMailer::Base.deliveries.should_not be_empty
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Alchemy
|
|
4
|
+
describe UserSessionsController do
|
|
5
|
+
|
|
6
|
+
let(:user) { FactoryGirl.create(:admin_user) }
|
|
7
|
+
let(:page) { FactoryGirl.create(:page) }
|
|
8
|
+
|
|
9
|
+
before { sign_in :user, user }
|
|
10
|
+
|
|
11
|
+
describe "signout" do
|
|
12
|
+
it "should unlock all pages" do
|
|
13
|
+
@request.env["devise.mapping"] = Devise.mappings[:user]
|
|
14
|
+
page.lock(user)
|
|
15
|
+
delete :destroy
|
|
16
|
+
user.locked_pages.should be_empty
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
require 'spec_helper'
|
|
2
|
+
|
|
3
|
+
module Alchemy
|
|
4
|
+
describe UsersController do
|
|
5
|
+
|
|
6
|
+
context "with users present" do
|
|
7
|
+
before { FactoryGirl.create(:admin_user) }
|
|
8
|
+
|
|
9
|
+
it "should redirect to admin dashboard" do
|
|
10
|
+
get :new
|
|
11
|
+
response.should redirect_to(admin_dashboard_path)
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
describe '#new' do
|
|
16
|
+
render_views
|
|
17
|
+
|
|
18
|
+
before { get :new }
|
|
19
|
+
|
|
20
|
+
it "should not render tag list input" do
|
|
21
|
+
response.body.should_not have_selector('.autocomplete_tag_list')
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
it "should render hidden field for role" do
|
|
25
|
+
response.body.should have_selector('input[type="hidden"]#user_role')
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
it "should set the role to admin" do
|
|
29
|
+
assigns(:user).role.should == "admin"
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
describe '#create' do
|
|
34
|
+
before { ActionMailer::Base.deliveries = [] }
|
|
35
|
+
|
|
36
|
+
context "with send_credentials set to true" do
|
|
37
|
+
it "should send an email notification" do
|
|
38
|
+
post :create, {
|
|
39
|
+
:user => FactoryGirl.attributes_for(:admin_user),
|
|
40
|
+
:send_credentials => true
|
|
41
|
+
}
|
|
42
|
+
ActionMailer::Base.deliveries.should_not be_empty
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
context "with send_credentials left blank" do
|
|
47
|
+
it "should not send an email notification" do
|
|
48
|
+
post :create, {
|
|
49
|
+
:user => FactoryGirl.attributes_for(:admin_user)
|
|
50
|
+
}
|
|
51
|
+
ActionMailer::Base.deliveries.should be_empty
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
context "with valid params" do
|
|
56
|
+
it "should sign in the user" do
|
|
57
|
+
post :create, {
|
|
58
|
+
:user => FactoryGirl.attributes_for(:admin_user)
|
|
59
|
+
}
|
|
60
|
+
controller.send(:user_signed_in?).should be_true
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
class MigrateToDevise < ActiveRecord::Migration
|
|
2
|
+
def change
|
|
3
|
+
change_table :alchemy_users do |t|
|
|
4
|
+
t.rename :crypted_password, :encrypted_password
|
|
5
|
+
t.rename :login_count, :sign_in_count
|
|
6
|
+
t.rename :current_login_at, :current_sign_in_at
|
|
7
|
+
t.rename :last_login_at, :last_sign_in_at
|
|
8
|
+
t.rename :current_login_ip, :current_sign_in_ip
|
|
9
|
+
t.rename :last_login_ip, :last_sign_in_ip
|
|
10
|
+
t.rename :failed_login_count, :failed_attempts
|
|
11
|
+
|
|
12
|
+
t.remove :persistence_token
|
|
13
|
+
t.remove :perishable_token
|
|
14
|
+
t.remove :single_access_token
|
|
15
|
+
|
|
16
|
+
t.column :reset_password_token, :string
|
|
17
|
+
t.column :reset_password_sent_at, :datetime
|
|
18
|
+
|
|
19
|
+
t.index :email, :unique => true
|
|
20
|
+
t.index :login, :unique => true
|
|
21
|
+
t.index :reset_password_token, :unique => true
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
data/spec/dummy/db/schema.rb
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
#
|
|
12
12
|
# It's strongly recommended to check this file into your version control system.
|
|
13
13
|
|
|
14
|
-
ActiveRecord::Schema.define(:version =>
|
|
14
|
+
ActiveRecord::Schema.define(:version => 20130121092645) do
|
|
15
15
|
|
|
16
16
|
create_table "alchemy_attachments", :force => true do |t|
|
|
17
17
|
t.string "name"
|
|
@@ -271,28 +271,29 @@ ActiveRecord::Schema.define(:version => 20130110212411) do
|
|
|
271
271
|
t.string "login"
|
|
272
272
|
t.string "email"
|
|
273
273
|
t.string "gender"
|
|
274
|
-
t.string "role",
|
|
274
|
+
t.string "role", :default => "registered"
|
|
275
275
|
t.string "language"
|
|
276
|
-
t.string "
|
|
277
|
-
t.string "password_salt",
|
|
278
|
-
t.integer "
|
|
279
|
-
t.integer "
|
|
276
|
+
t.string "encrypted_password", :limit => 128, :default => "", :null => false
|
|
277
|
+
t.string "password_salt", :limit => 128, :default => "", :null => false
|
|
278
|
+
t.integer "sign_in_count", :default => 0, :null => false
|
|
279
|
+
t.integer "failed_attempts", :default => 0, :null => false
|
|
280
280
|
t.datetime "last_request_at"
|
|
281
|
-
t.datetime "
|
|
282
|
-
t.datetime "
|
|
283
|
-
t.string "
|
|
284
|
-
t.string "
|
|
285
|
-
t.
|
|
286
|
-
t.
|
|
287
|
-
t.string "perishable_token", :null => false
|
|
288
|
-
t.datetime "created_at", :null => false
|
|
289
|
-
t.datetime "updated_at", :null => false
|
|
281
|
+
t.datetime "current_sign_in_at"
|
|
282
|
+
t.datetime "last_sign_in_at"
|
|
283
|
+
t.string "current_sign_in_ip"
|
|
284
|
+
t.string "last_sign_in_ip"
|
|
285
|
+
t.datetime "created_at", :null => false
|
|
286
|
+
t.datetime "updated_at", :null => false
|
|
290
287
|
t.integer "creator_id"
|
|
291
288
|
t.integer "updater_id"
|
|
292
289
|
t.text "cached_tag_list"
|
|
290
|
+
t.string "reset_password_token"
|
|
291
|
+
t.datetime "reset_password_sent_at"
|
|
293
292
|
end
|
|
294
293
|
|
|
295
|
-
add_index "alchemy_users", ["
|
|
294
|
+
add_index "alchemy_users", ["email"], :name => "index_alchemy_users_on_email", :unique => true
|
|
295
|
+
add_index "alchemy_users", ["login"], :name => "index_alchemy_users_on_login", :unique => true
|
|
296
|
+
add_index "alchemy_users", ["reset_password_token"], :name => "index_alchemy_users_on_reset_password_token", :unique => true
|
|
296
297
|
|
|
297
298
|
create_table "events", :force => true do |t|
|
|
298
299
|
t.string "name"
|