rocket_cms 0.5.4 → 0.5.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 86a7ee36ef4c3e2e93d8bb986f95e2d2a3ecbcd2
4
- data.tar.gz: c20dda4cdf77461f9980fc0d954f80edb5bab1ba
3
+ metadata.gz: e7cd52bf675c271bdebedd19c6b90b9556a285a8
4
+ data.tar.gz: 4939e20e95c8cbebc16679af8a8a7efa092200df
5
5
  SHA512:
6
- metadata.gz: dda64f1ce00f88a4e01719d0f69040c267d36a29a71cfa7efaf3fb626be99d5ce37484fab1a94ab86a9068505773707cc145b058071bd9afbca7b594791938c2
7
- data.tar.gz: 50611a2fda297fde746d6469407749a38e3a669671713ad7b82a6487e8e3ead5d86b889343ff9ada400c3c5610c5a5ae014f62afbcbbf053295fb32b8ff45b52
6
+ metadata.gz: b60a7cbbdab9670a8dbe3b9c93749a1bf2950eb86df42761c63d0c8c134236db2ee08805d2bc57be95a0425a82c67380a4db2df53c3de0394254268fd1bf8cb8
7
+ data.tar.gz: 432a375ea03d3dea9ec6569ef06f60ac50a2a711cdddf7ad5483ae9f7e040bc651b58015f86c74fdafb71d40d255fe2f78237b1b41c3c6a73a37686a2a818978
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.5.4)
4
+ rocket_cms (0.5.5)
5
5
  addressable
6
6
  coffee-rails
7
7
  devise
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
@@ -370,7 +370,6 @@ files:
370
370
  - app/models/concerns/boolean_field.rb
371
371
  - app/models/concerns/enableable.rb
372
372
  - app/models/concerns/geocodeable.rb
373
- - app/models/concerns/manual_slug.rb
374
373
  - app/models/concerns/mappable.rb
375
374
  - app/models/concerns/seoable.rb
376
375
  - app/models/concerns/sort_field.rb
@@ -1,38 +0,0 @@
1
- module ManualSlug
2
- extend ActiveSupport::Concern
3
- include Mongoid::Slug
4
-
5
- def text_slug
6
- self._slugs.empty? ? '' : self._slugs.last
7
- end
8
- def text_slug=(slug)
9
- if slug.blank?
10
- self._slugs = []
11
- else
12
- self._slugs.delete(slug)
13
- self._slugs << slug
14
- end
15
- end
16
-
17
- module ClassMethods
18
- def manual_slug(field, options = {}, callback = true)
19
- options.merge!(permanent: true, history: true)
20
- slug field, options
21
-
22
- # we will create slugs manually when needed
23
- skip_callback :create, :before, :build_slug
24
-
25
- before_validation do
26
- self._slugs = self._slugs.map{ |s| s.strip }.select {|s| !s.blank? }
27
-
28
- if self._slugs.empty?
29
- self.build_slug
30
- end
31
-
32
- true
33
- end if callback
34
- end
35
- end
36
-
37
- end
38
-