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.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/alchemy_cms.gemspec +1 -1
- data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +11 -10
- data/app/assets/stylesheets/alchemy/selects.scss +4 -0
- data/app/controllers/alchemy/admin/contents_controller.rb +4 -3
- data/app/models/alchemy/page/page_naming.rb +29 -16
- data/lib/alchemy/controller_actions.rb +3 -4
- data/lib/alchemy/essence.rb +4 -4
- data/lib/alchemy/permissions.rb +1 -1
- data/lib/alchemy/version.rb +1 -1
- data/spec/controllers/admin/contents_controller_spec.rb +9 -4
- data/spec/dummy/app/models/dummy_model.rb +3 -0
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +1 -0
- data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +1 -0
- data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +1 -0
- data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +1 -0
- data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb +1 -0
- data/spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb +1 -0
- data/spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb +1 -0
- data/spec/dummy/db/migrate/20150412103152_create_dummy_model.rb +7 -0
- data/spec/dummy/db/schema.rb +30 -26
- data/spec/dummy/spec/javascripts +1 -0
- data/spec/features/admin/page_creation_feature_spec.rb +2 -2
- data/spec/features/admin/picture_library_integration_spec.rb +32 -28
- data/spec/features/picture_security_spec.rb +2 -2
- data/spec/libraries/permissions_spec.rb +9 -0
- data/spec/models/dummy_model_spec.rb +11 -0
- data/spec/models/page_spec.rb +13 -1
- metadata +17 -3
- data/spec/dummy/db/migrate/20130827094554_alchemy_two_point_six.rb +0 -397
- data/spec/dummy/db/migrate/20130828121054_remove_do_not_index_from_alchemy_essence_texts.rb +0 -5
- data/spec/dummy/db/migrate/20130828121120_remove_do_not_index_from_alchemy_essence_richtexts.rb +0 -5
- data/spec/dummy/db/migrate/20130918201742_add_published_at_to_alchemy_pages.rb +0 -5
- data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb +0 -21
- data/spec/dummy/db/migrate/20140701160159_add_taggings_counter_cache_to_tags.rb +0 -14
- data/spec/dummy/db/migrate/20140701160225_add_missing_taggable_index.rb +0 -9
data/spec/dummy/db/migrate/20140107192720_add_missing_unique_indices_to_tags_and_taggings.rb
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
class AddMissingUniqueIndicesToTagsAndTaggings < ActiveRecord::Migration
|
2
|
-
|
3
|
-
def self.up
|
4
|
-
add_index :tags, :name, unique: true
|
5
|
-
|
6
|
-
remove_index :taggings, :tag_id
|
7
|
-
remove_index :taggings, [:taggable_id, :taggable_type, :context]
|
8
|
-
add_index :taggings,
|
9
|
-
[:tag_id, :taggable_id, :taggable_type, :context, :tagger_id, :tagger_type],
|
10
|
-
unique: true, name: 'taggings_idx'
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.down
|
14
|
-
remove_index :tags, :name
|
15
|
-
|
16
|
-
remove_index :taggings, name: 'tagging_idx'
|
17
|
-
add_index :taggings, :tag_id
|
18
|
-
add_index :taggings, [:taggable_id, :taggable_type, :context]
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration
|
2
|
-
def self.up
|
3
|
-
add_column :tags, :taggings_count, :integer, default: 0
|
4
|
-
|
5
|
-
ActsAsTaggableOn::Tag.reset_column_information
|
6
|
-
ActsAsTaggableOn::Tag.find_each do |tag|
|
7
|
-
ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
def self.down
|
12
|
-
remove_column :tags, :taggings_count
|
13
|
-
end
|
14
|
-
end
|