alchemy_cms 3.1.1 → 3.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +1 -1
  3. data/alchemy_cms.gemspec +1 -1
  4. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +11 -10
  5. data/app/assets/stylesheets/alchemy/selects.scss +4 -0
  6. data/app/controllers/alchemy/admin/contents_controller.rb +4 -3
  7. data/app/models/alchemy/page/page_naming.rb +29 -16
  8. data/lib/alchemy/controller_actions.rb +3 -4
  9. data/lib/alchemy/essence.rb +4 -4
  10. data/lib/alchemy/permissions.rb +1 -1
  11. data/lib/alchemy/version.rb +1 -1
  12. data/spec/controllers/admin/contents_controller_spec.rb +9 -4
  13. data/spec/dummy/app/models/dummy_model.rb +3 -0
  14. data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +1 -0
  15. data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +1 -0
  16. data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +1 -0
  17. data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +1 -0
  18. data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb +1 -0
  19. data/spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb +1 -0
  20. data/spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb +1 -0
  21. data/spec/dummy/db/migrate/20150412103152_create_dummy_model.rb +7 -0
  22. data/spec/dummy/db/schema.rb +30 -26
  23. data/spec/dummy/spec/javascripts +1 -0
  24. data/spec/features/admin/page_creation_feature_spec.rb +2 -2
  25. data/spec/features/admin/picture_library_integration_spec.rb +32 -28
  26. data/spec/features/picture_security_spec.rb +2 -2
  27. data/spec/libraries/permissions_spec.rb +9 -0
  28. data/spec/models/dummy_model_spec.rb +11 -0
  29. data/spec/models/page_spec.rb +13 -1
  30. metadata +17 -3
  31. data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -397
  32. data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +0 -5
  33. data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +0 -5
  34. data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +0 -5
  35. data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb +0 -21
  36. data/spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb +0 -14
  37. data/spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: da3fbeab242eee7ed6dde78b96f4a503df8168d1
4
- data.tar.gz: 372a82e46f31f66b61776290d1c2e6a56fa340a6
3
+ metadata.gz: 769125dc98331eab2415c8b2e4339082170834fc
4
+ data.tar.gz: 279c3a68c99d1118c422247437477c0781657b95
5
5
  SHA512:
6
- metadata.gz: c6d578e24ffa7c5c6dc715e9e6ce3f859e49d7acbc1d42ad2b83f64e1adb9ce91acb5c4463071b91a6e88a020bc3592cee949517fc98304f5d4a5b35ff265531
7
- data.tar.gz: e047f4e17c7081890e7b6abe6e4707de26715b610bb11e722d7cbb695bfcce2a446ef524895cb3f4591132ec157ade16d7d2244c66661199c0ecf876405090e9
6
+ metadata.gz: dee4216e57abff1cface5e8fb44b1087c5cd0e32528f6909b5c5e33dbccadf1d94b1f27b5d2f3bca0eb2d157b9b74f737d700329a77f6859a25b1672ca9da3c7
7
+ data.tar.gz: 2896eb6816bdd6ae3cfb18390ebb88357b8306b815fa5630e4163599d46087039407eaf4962063206e3bfd0cabd78c5464636bca6174b25f8fabad86211f85b7
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ if ENV['RAILS_VERSION']
7
7
  end
8
8
 
9
9
  gem 'sqlite3' if ENV['DB'].nil? || ENV['DB'] == 'sqlite'
10
- gem 'mysql2' if ENV['DB'] == 'mysql'
10
+ gem 'mysql2', '~> 0.3.18' if ENV['DB'] == 'mysql'
11
11
  gem 'pg' if ENV['DB'] == 'postgresql'
12
12
 
13
13
  group :development, :test do
data/alchemy_cms.gemspec CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.add_runtime_dependency 'acts_as_list', ['~> 0.3']
25
25
  gem.add_runtime_dependency 'acts-as-taggable-on', ['~> 3.1']
26
26
  gem.add_runtime_dependency 'awesome_nested_set', ['~> 3.0.0']
27
- gem.add_runtime_dependency 'cancancan', ['~> 1.9']
27
+ gem.add_runtime_dependency 'cancancan', ['~> 1.9', '< 1.13.0']
28
28
  gem.add_runtime_dependency 'coffee-rails', ['~> 4.0']
29
29
  gem.add_runtime_dependency 'compass-rails', ['~> 1.1']
30
30
  gem.add_runtime_dependency 'dragonfly', ['~> 1.0.1']
@@ -46,16 +46,17 @@ $.extend Alchemy,
46
46
  # fades the image after its been loaded
47
47
  ImageLoader: (scope = document, options = {color: '#fff'}) ->
48
48
  $('img', scope).each ->
49
- image = $(this).hide()
50
- $parent = image.parent()
51
- spinner = Alchemy.Spinner.small options
52
- spinner.spin $parent[0]
53
- image.on 'load', ->
54
- spinner.stop()
55
- image.fadeIn 400
56
- image.on 'error', ->
57
- spinner.stop()
58
- $parent.html('<span class="icon warn"/>')
49
+ if !this.complete
50
+ image = $(this).hide()
51
+ $parent = image.parent()
52
+ spinner = Alchemy.Spinner.small options
53
+ spinner.spin $parent[0]
54
+ image.on 'load', ->
55
+ spinner.stop()
56
+ image.fadeIn 400
57
+ image.on 'error', ->
58
+ spinner.stop()
59
+ $parent.html('<span class="icon warn"/>')
59
60
 
60
61
  removePicture: (selector) ->
61
62
  $form_field = $(selector)
@@ -139,6 +139,10 @@ select {
139
139
 
140
140
  .select2-search {
141
141
  margin: $default-margin 0;
142
+
143
+ .select2-input {
144
+ width: inherit;
145
+ }
142
146
  }
143
147
 
144
148
  &.select2-with-searchbox .select2-results > .select2-result:first-child {
@@ -33,9 +33,10 @@ module Alchemy
33
33
  end
34
34
 
35
35
  def order
36
- params[:content_ids].each do |id|
37
- content = Content.find(id)
38
- content.move_to_bottom
36
+ Content.transaction do
37
+ params[:content_ids].each_with_index do |id, idx|
38
+ Content.where(id: id).update_all(position: idx + 1)
39
+ end
39
40
  end
40
41
  @notice = _t("Successfully saved content position")
41
42
  end
@@ -37,8 +37,7 @@ module Alchemy
37
37
  # Makes a slug of all ancestors urlnames including mine and delimit them be slash.
38
38
  # So the whole path is stored as urlname in the database.
39
39
  def update_urlname!
40
- names = ancestors.visible.contentpages.where(language_root: nil).map(&:slug).compact
41
- new_urlname = (names << slug).join('/')
40
+ new_urlname = nested_url_name(slug)
42
41
  if urlname != new_urlname
43
42
  legacy_urls.create(urlname: urlname)
44
43
  update_column(:urlname, new_urlname)
@@ -56,6 +55,18 @@ module Alchemy
56
55
  "http://#{urlname}"
57
56
  end
58
57
 
58
+ # Returns an array of visible/non-language_root ancestors.
59
+ def visible_ancestors
60
+ return [] unless parent
61
+ if new_record?
62
+ parent.visible_ancestors.tap do |base|
63
+ base.push(parent) if parent.visible?
64
+ end
65
+ else
66
+ ancestors.visible.contentpages.where(language_root: nil).to_a
67
+ end
68
+ end
69
+
59
70
  private
60
71
 
61
72
  def update_descendants_urlnames
@@ -71,18 +82,15 @@ module Alchemy
71
82
  # If url_nesting is enabled the urlname contains the whole path.
72
83
  def set_urlname
73
84
  if Config.get(:url_nesting)
74
- url_name = [
75
- parent_urlname,
76
- convert_url_name(urlname.blank? ? name : slug)
77
- ].compact.join('/')
85
+ value = slug
78
86
  else
79
- url_name = convert_url_name(urlname.blank? ? name : urlname)
87
+ value = urlname
80
88
  end
81
- write_attribute :urlname, url_name
89
+ self[:urlname] = nested_url_name(value)
82
90
  end
83
91
 
84
92
  def set_title
85
- write_attribute :title, name
93
+ self[:title] = name
86
94
  end
87
95
 
88
96
  # Converts the given name into an url friendly string.
@@ -90,8 +98,8 @@ module Alchemy
90
98
  # Names shorter than 3 will be filled up with dashes,
91
99
  # so it does not collidate with the language code.
92
100
  #
93
- def convert_url_name(name)
94
- url_name = convert_to_urlname(name)
101
+ def convert_url_name(value)
102
+ url_name = convert_to_urlname(value.blank? ? name : value)
95
103
  if url_name.length < 3
96
104
  ('-' * (3 - url_name.length)) + url_name
97
105
  else
@@ -99,11 +107,16 @@ module Alchemy
99
107
  end
100
108
  end
101
109
 
102
- # Urlname of parent page.
103
- # Returns nil, if the parent is either a language root page or the root page itself
104
- def parent_urlname
105
- return if parent.nil? || parent.language_root? || parent.root?
106
- parent.urlname
110
+ def nested_url_name(value)
111
+ (ancestor_slugs << convert_url_name(value)).join('/')
112
+ end
113
+
114
+ # Slugs of all visible/non-language_root ancestors.
115
+ # Returns [], if there is no parent, the parent is
116
+ # the root page itself, or url_nesting is off.
117
+ def ancestor_slugs
118
+ return [] if !Config.get(:url_nesting) || parent.nil? || parent.root?
119
+ visible_ancestors.map(&:slug).compact
107
120
  end
108
121
  end
109
122
  end
@@ -3,8 +3,7 @@ module Alchemy
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
- before_action :set_current_alchemy_site
7
- before_action :set_alchemy_language
6
+ prepend_before_action :set_alchemy_language, :set_current_alchemy_site
8
7
 
9
8
  helper 'alchemy/pages'
10
9
 
@@ -66,8 +65,8 @@ module Alchemy
66
65
  Alchemy.registered_abilities.each do |klass|
67
66
  alchemy_permissions.merge(klass.new(current_alchemy_user))
68
67
  end
69
- if (Object.const_get('Ability') rescue false)
70
- alchemy_permissions.merge(Ability.new(current_alchemy_user))
68
+ if (Object.const_get('::Ability') rescue false)
69
+ alchemy_permissions.merge(::Ability.new(current_alchemy_user))
71
70
  end
72
71
  alchemy_permissions
73
72
  end
@@ -36,11 +36,11 @@ module Alchemy #:nodoc:
36
36
  stampable stamper_class_name: Alchemy.user_class_name
37
37
  validate :validate_ingredient, :on => :update, :if => 'validations.any?'
38
38
 
39
- has_one :content, :as => :essence
40
- has_one :element, :through => :content
41
- has_one :page, :through => :element
39
+ has_one :content, :as => :essence, class_name: "Alchemy::Content"
40
+ has_one :element, :through => :content, class_name: "Alchemy::Element"
41
+ has_one :page, :through => :element, class_name: "Alchemy::Page"
42
42
 
43
- scope :available, -> { joins(:element).merge(Element.available) }
43
+ scope :available, -> { joins(:element).merge(Alchemy::Element.available) }
44
44
  scope :from_element, ->(name) { joins(:element).where(alchemy_elements: { name: name }) }
45
45
 
46
46
  delegate :restricted?, to: :page, allow_nil: true
@@ -182,7 +182,7 @@ module Alchemy
182
182
  private
183
183
 
184
184
  def user_role_rules
185
- return [] if @user.alchemy_roles.nil?
185
+ return alchemy_guest_user_rules if @user.alchemy_roles.blank?
186
186
  @user.alchemy_roles.each do |role|
187
187
  exec_role_rules(role) if @user.alchemy_roles.include?(role)
188
188
  end
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
- VERSION = "3.1.1"
2
+ VERSION = "3.1.3"
3
3
 
4
4
  def self.version
5
5
  VERSION
@@ -14,7 +14,6 @@ module Alchemy
14
14
  expect(Element).to receive(:find).and_return(element)
15
15
  end
16
16
 
17
-
18
17
  describe '#create' do
19
18
  let(:element) { build_stubbed(:element, name: 'headline') }
20
19
 
@@ -61,11 +60,17 @@ module Alchemy
61
60
 
62
61
  describe "#order" do
63
62
  context "with content_ids in params" do
63
+ let(:element) do
64
+ create(:element, name: 'all_you_can_eat', create_contents_after_create: true)
65
+ end
66
+
67
+ let(:content_ids) { element.contents.pluck(:id).shuffle }
68
+
64
69
  it "should reorder the contents" do
65
- content_ids = element.contents.essence_texts.pluck(:id)
66
- xhr :post, :order, {content_ids: content_ids.reverse}
70
+ xhr :post, :order, {content_ids: content_ids}
71
+
67
72
  expect(response.status).to eq(200)
68
- expect(element.contents.essence_texts.pluck(:id)).to eq(content_ids.reverse)
73
+ expect(element.contents(true).pluck(:id)).to eq(content_ids)
69
74
  end
70
75
  end
71
76
  end
@@ -0,0 +1,3 @@
1
+ class DummyModel < ActiveRecord::Base
2
+ acts_as_essence ingredient_column: 'data'
3
+ end
@@ -0,0 +1 @@
1
+ ../../../../db/migrate/20130827094554_alchemy_two_point_six.rb
@@ -0,0 +1 @@
1
+ ../../../../db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb
@@ -0,0 +1 @@
1
+ ../../../../db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb
@@ -0,0 +1 @@
1
+ ../../../../db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb
@@ -0,0 +1 @@
1
+ ../../../../db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb
@@ -0,0 +1 @@
1
+ ../../../../db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb
@@ -0,0 +1 @@
1
+ ../../../../db/migrate/20140701160225_add_missing_taggable_index.rb
@@ -0,0 +1,7 @@
1
+ class CreateDummyModel < ActiveRecord::Migration
2
+ def change
3
+ create_table :dummy_models do |t|
4
+ t.string :data
5
+ end
6
+ end
7
+ end
@@ -11,9 +11,9 @@
11
11
  #
12
12
  # It's strongly recommended that you check this file into your version control system.
13
13
 
14
- ActiveRecord::Schema.define(version: 20140701160225) do
14
+ ActiveRecord::Schema.define(version: 20150412103152) do
15
15
 
16
- create_table "alchemy_attachments", force: true do |t|
16
+ create_table "alchemy_attachments", force: :cascade do |t|
17
17
  t.string "name"
18
18
  t.string "file_name"
19
19
  t.string "file_mime_type"
@@ -28,14 +28,14 @@ ActiveRecord::Schema.define(version: 20140701160225) do
28
28
 
29
29
  add_index "alchemy_attachments", ["file_uid"], name: "index_alchemy_attachments_on_file_uid"
30
30
 
31
- create_table "alchemy_cells", force: true do |t|
31
+ create_table "alchemy_cells", force: :cascade do |t|
32
32
  t.integer "page_id"
33
33
  t.string "name"
34
34
  t.datetime "created_at", null: false
35
35
  t.datetime "updated_at", null: false
36
36
  end
37
37
 
38
- create_table "alchemy_contents", force: true do |t|
38
+ create_table "alchemy_contents", force: :cascade do |t|
39
39
  t.string "name"
40
40
  t.string "essence_type"
41
41
  t.integer "essence_id"
@@ -49,7 +49,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
49
49
 
50
50
  add_index "alchemy_contents", ["element_id", "position"], name: "index_contents_on_element_id_and_position"
51
51
 
52
- create_table "alchemy_elements", force: true do |t|
52
+ create_table "alchemy_elements", force: :cascade do |t|
53
53
  t.string "name"
54
54
  t.integer "position"
55
55
  t.integer "page_id"
@@ -66,12 +66,12 @@ ActiveRecord::Schema.define(version: 20140701160225) do
66
66
 
67
67
  add_index "alchemy_elements", ["page_id", "position"], name: "index_elements_on_page_id_and_position"
68
68
 
69
- create_table "alchemy_elements_alchemy_pages", id: false, force: true do |t|
69
+ create_table "alchemy_elements_alchemy_pages", id: false, force: :cascade do |t|
70
70
  t.integer "element_id"
71
71
  t.integer "page_id"
72
72
  end
73
73
 
74
- create_table "alchemy_essence_booleans", force: true do |t|
74
+ create_table "alchemy_essence_booleans", force: :cascade do |t|
75
75
  t.boolean "value"
76
76
  t.datetime "created_at", null: false
77
77
  t.datetime "updated_at", null: false
@@ -81,7 +81,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
81
81
 
82
82
  add_index "alchemy_essence_booleans", ["value"], name: "index_alchemy_essence_booleans_on_value"
83
83
 
84
- create_table "alchemy_essence_dates", force: true do |t|
84
+ create_table "alchemy_essence_dates", force: :cascade do |t|
85
85
  t.datetime "date"
86
86
  t.integer "creator_id"
87
87
  t.integer "updater_id"
@@ -89,7 +89,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
89
89
  t.datetime "updated_at", null: false
90
90
  end
91
91
 
92
- create_table "alchemy_essence_files", force: true do |t|
92
+ create_table "alchemy_essence_files", force: :cascade do |t|
93
93
  t.integer "attachment_id"
94
94
  t.string "title"
95
95
  t.string "css_class"
@@ -99,7 +99,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
99
99
  t.datetime "updated_at", null: false
100
100
  end
101
101
 
102
- create_table "alchemy_essence_htmls", force: true do |t|
102
+ create_table "alchemy_essence_htmls", force: :cascade do |t|
103
103
  t.text "source"
104
104
  t.integer "creator_id"
105
105
  t.integer "updater_id"
@@ -107,7 +107,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
107
107
  t.datetime "updated_at", null: false
108
108
  end
109
109
 
110
- create_table "alchemy_essence_links", force: true do |t|
110
+ create_table "alchemy_essence_links", force: :cascade do |t|
111
111
  t.string "link"
112
112
  t.string "link_title"
113
113
  t.string "link_target"
@@ -118,7 +118,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
118
118
  t.integer "updater_id"
119
119
  end
120
120
 
121
- create_table "alchemy_essence_pictures", force: true do |t|
121
+ create_table "alchemy_essence_pictures", force: :cascade do |t|
122
122
  t.integer "picture_id"
123
123
  t.string "caption"
124
124
  t.string "title"
@@ -137,7 +137,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
137
137
  t.string "render_size"
138
138
  end
139
139
 
140
- create_table "alchemy_essence_richtexts", force: true do |t|
140
+ create_table "alchemy_essence_richtexts", force: :cascade do |t|
141
141
  t.text "body"
142
142
  t.text "stripped_body"
143
143
  t.boolean "public"
@@ -147,7 +147,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
147
147
  t.datetime "updated_at", null: false
148
148
  end
149
149
 
150
- create_table "alchemy_essence_selects", force: true do |t|
150
+ create_table "alchemy_essence_selects", force: :cascade do |t|
151
151
  t.string "value"
152
152
  t.datetime "created_at", null: false
153
153
  t.datetime "updated_at", null: false
@@ -157,7 +157,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
157
157
 
158
158
  add_index "alchemy_essence_selects", ["value"], name: "index_alchemy_essence_selects_on_value"
159
159
 
160
- create_table "alchemy_essence_texts", force: true do |t|
160
+ create_table "alchemy_essence_texts", force: :cascade do |t|
161
161
  t.text "body"
162
162
  t.string "link"
163
163
  t.string "link_title"
@@ -170,13 +170,13 @@ ActiveRecord::Schema.define(version: 20140701160225) do
170
170
  t.datetime "updated_at", null: false
171
171
  end
172
172
 
173
- create_table "alchemy_folded_pages", force: true do |t|
173
+ create_table "alchemy_folded_pages", force: :cascade do |t|
174
174
  t.integer "page_id"
175
175
  t.integer "user_id"
176
176
  t.boolean "folded", default: false
177
177
  end
178
178
 
179
- create_table "alchemy_languages", force: true do |t|
179
+ create_table "alchemy_languages", force: :cascade do |t|
180
180
  t.string "name"
181
181
  t.string "language_code"
182
182
  t.string "frontpage_name"
@@ -195,7 +195,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
195
195
  add_index "alchemy_languages", ["language_code"], name: "index_alchemy_languages_on_language_code"
196
196
  add_index "alchemy_languages", ["site_id"], name: "index_alchemy_languages_on_site_id"
197
197
 
198
- create_table "alchemy_legacy_page_urls", force: true do |t|
198
+ create_table "alchemy_legacy_page_urls", force: :cascade do |t|
199
199
  t.string "urlname", null: false
200
200
  t.integer "page_id", null: false
201
201
  t.datetime "created_at", null: false
@@ -204,7 +204,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
204
204
 
205
205
  add_index "alchemy_legacy_page_urls", ["urlname"], name: "index_alchemy_legacy_page_urls_on_urlname"
206
206
 
207
- create_table "alchemy_pages", force: true do |t|
207
+ create_table "alchemy_pages", force: :cascade do |t|
208
208
  t.string "name"
209
209
  t.string "urlname"
210
210
  t.string "title"
@@ -239,7 +239,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
239
239
  add_index "alchemy_pages", ["parent_id", "lft"], name: "index_pages_on_parent_id_and_lft"
240
240
  add_index "alchemy_pages", ["urlname"], name: "index_pages_on_urlname"
241
241
 
242
- create_table "alchemy_pictures", force: true do |t|
242
+ create_table "alchemy_pictures", force: :cascade do |t|
243
243
  t.string "name"
244
244
  t.string "image_file_name"
245
245
  t.integer "image_file_width"
@@ -254,7 +254,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
254
254
  t.integer "image_file_size"
255
255
  end
256
256
 
257
- create_table "alchemy_sites", force: true do |t|
257
+ create_table "alchemy_sites", force: :cascade do |t|
258
258
  t.string "host"
259
259
  t.string "name"
260
260
  t.datetime "created_at", null: false
@@ -267,14 +267,18 @@ ActiveRecord::Schema.define(version: 20140701160225) do
267
267
  add_index "alchemy_sites", ["host", "public"], name: "alchemy_sites_public_hosts_idx"
268
268
  add_index "alchemy_sites", ["host"], name: "index_alchemy_sites_on_host"
269
269
 
270
- create_table "dummy_users", force: true do |t|
270
+ create_table "dummy_models", force: :cascade do |t|
271
+ t.string "data"
272
+ end
273
+
274
+ create_table "dummy_users", force: :cascade do |t|
271
275
  t.string "email"
272
276
  t.string "password"
273
277
  end
274
278
 
275
279
  add_index "dummy_users", ["email"], name: "index_dummy_users_on_email"
276
280
 
277
- create_table "events", force: true do |t|
281
+ create_table "events", force: :cascade do |t|
278
282
  t.string "name"
279
283
  t.string "hidden_name"
280
284
  t.datetime "starts_at"
@@ -289,13 +293,13 @@ ActiveRecord::Schema.define(version: 20140701160225) do
289
293
  t.datetime "updated_at", null: false
290
294
  end
291
295
 
292
- create_table "locations", force: true do |t|
296
+ create_table "locations", force: :cascade do |t|
293
297
  t.string "name"
294
298
  t.datetime "created_at"
295
299
  t.datetime "updated_at"
296
300
  end
297
301
 
298
- create_table "taggings", force: true do |t|
302
+ create_table "taggings", force: :cascade do |t|
299
303
  t.integer "tag_id"
300
304
  t.integer "taggable_id"
301
305
  t.string "taggable_type"
@@ -308,7 +312,7 @@ ActiveRecord::Schema.define(version: 20140701160225) do
308
312
  add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
309
313
  add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
310
314
 
311
- create_table "tags", force: true do |t|
315
+ create_table "tags", force: :cascade do |t|
312
316
  t.string "name"
313
317
  t.integer "taggings_count", default: 0
314
318
  end