coalla-cms 0.6.0.9 → 0.7.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NDE4OTZlZWE2NzIwZjEzZTY1MmVkYjU2MjIxMjdjZTUxNjIzZmY2Yg==
4
+ NWRkOWY2ZWVmOTdmNGJkZTkwMmJkZTEyNTYzZjQ2MDhkM2Y1MjQzMA==
5
5
  data.tar.gz: !binary |-
6
- YTMzYjQyOTE2NGUzMjEzZTVkNzQ3YTI4N2M4NWZlYmRlYmY3ZTIyMg==
6
+ ZTUxMDliMmJhZTVlMmJiZDcwNzRmOGE2Y2Y4NjMyZWNiMmRmNjY0Yg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MzAxNmMwNDM2ZGVmYzk4NmViYTY0YTNkZWZiNjU4NWFhZjY3Y2E1NmZkNmY0
10
- ZmM0NzBkM2JhNzY0NzAzMGJjNzRkNTU3NzU2ZmFiYzFjODQzNjQ2YjMyZGE2
11
- YmRlMTAzOTk0ZTBkMjgyMThkNWY2MDgzMjYwNjRmZGU1OTkxZGE=
9
+ Yjk4YzEzNzFkZjYxMDkwNWRiMWMzMWFlOWI1ZDY3OWFlNjRmNjdhZTNmMGRh
10
+ NDMzMmI3ZTMzYTlhNDdkOWUyNmRjMjI5ZjMxMWMyMjVlZDExNmE1MzAyOTU4
11
+ N2I4NjJiZThkYWMzYzI2Y2U1NmIzMzg4MzgxNTNlYmZhNzM0ZDM=
12
12
  data.tar.gz: !binary |-
13
- MTBlM2UzNDNjODY1YjMwZTMwZWJmYTZhMjE3MDQ4MGM1ZWU3NGU4N2M3MzBi
14
- MjYxZjQ4ZGM5MWU5Yzg5MDU4ZjE5MTA1MThiYjgyZDQzYzlhMzlkYzY4YWQ3
15
- YTk1NjY2Mjg4NzE1MDY4OGQzY2U2YjA3OWMwMGE5MDFjOWJiMmE=
13
+ OTk3NzU4YzU4NDllYzJmNTA1ODMyYjI3NTU5MzM1YmY2YThhNzdiODY4ZTRh
14
+ ZDY4OGZiMTUyZjY2YWEwMGVlM2Q4ZDExNTQyODU2OTIyMDAzNWJhYjA0MDc3
15
+ ZTYxN2RkN2YzMjAzYjFmYjg0OWUyYzMxMGUwOGVlMmUxMTkzODI=
@@ -287,7 +287,7 @@ $(function () {
287
287
  return false
288
288
  });
289
289
 
290
- $('[data-sortable-blocks]').sortable({
290
+ $('[data-sortable-blocks="true"]').sortable({
291
291
  items: '.fields_container',
292
292
  cancel: 'input,textarea,button,select,option,a',
293
293
  stop: function (e, ui) {
data/coalla-cms.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
19
19
  s.require_paths = ['lib']
20
20
 
21
- s.add_dependency 'rails', '~> 5.0'
21
+ s.add_dependency 'rails', '~> 6.0'
22
22
  s.add_dependency 'jquery-rails'
23
23
  s.add_dependency 'listen'
24
24
  s.add_dependency 'jquery-ui-rails'
@@ -35,7 +35,8 @@ Gem::Specification.new do |s|
35
35
  s.add_dependency 'rmagick'
36
36
  s.add_dependency 'will_paginate'
37
37
  s.add_dependency 'standalone_typograf', '~> 3.0.2'
38
- s.add_dependency 'meta-tags', '~> 2.4.0'
38
+ s.add_dependency 'meta-tags', '~> 2.13'
39
39
 
40
- s.required_ruby_version = '>= 2.0.0'
40
+
41
+ s.required_ruby_version = '>= 2.3'
41
42
  end
@@ -102,7 +102,7 @@ module Coalla
102
102
  end
103
103
 
104
104
  def combobox(method, choices, options = {}, html_options = {})
105
- row method, select(method, choices, options, with_default_options(html_options)), div_class: options.delete(:div_class) || 'col-md-6'
105
+ row method, select(method, choices, options, with_default_options(html_options)), options
106
106
  end
107
107
 
108
108
  def enum(method, options = {}, html_options = {})
@@ -1,5 +1,5 @@
1
1
  module Coalla
2
2
  module Cms
3
- VERSION = '0.6.0.9'
3
+ VERSION = '0.7.0.0'
4
4
  end
5
5
  end
@@ -2,12 +2,12 @@ module Coalla
2
2
  module MultiField
3
3
  def multi_field(relation_name, options = {})
4
4
  through_collection_name = options[:through_collection_name] || "#{self.model_name.singular}_#{relation_name}".to_sym
5
- reflection = self.reflections[through_collection_name] || self.reflections[through_collection_name.to_s]
5
+ reflection = reflections[through_collection_name] || reflections[through_collection_name.to_s]
6
6
  through_class = reflection.klass
7
7
 
8
8
  self_foreign_key_method = options.fetch(:self_foreign_key_method, reflection.foreign_key.gsub('_id', ''))
9
9
 
10
- reflection = self.reflections[relation_name] || self.reflections[relation_name.to_s]
10
+ reflection = reflections[relation_name] || reflections[relation_name.to_s]
11
11
  association_model_name = reflection.source_reflection_name.to_sym
12
12
  association_foreign_key = reflection.foreign_key
13
13
 
@@ -20,13 +20,19 @@ module Coalla
20
20
  item.position = position
21
21
  item
22
22
  end
23
- self.send("#{through_collection_name}=", new_through_collection)
23
+ send("#{through_collection_name}=", new_through_collection)
24
24
  end
25
25
 
26
26
  define_method "#{relation_name}_json" do |search_field|
27
- send(through_collection_name).map { |c| {id: c.send(association_model_name).id, name: c.send(association_model_name).send(search_field)} }
27
+ association_model = association_model_name.to_s.classify.constantize
28
+ send(through_collection_name).map do |c|
29
+ item = association_model.find(c.send(association_foreign_key))
30
+ {
31
+ id: item.id,
32
+ name: item.send(search_field)
33
+ }
34
+ end
28
35
  end
29
-
30
36
  end
31
37
  end
32
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coalla-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0.9
4
+ version: 0.7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - coalla
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-12 00:00:00.000000000 Z
11
+ date: 2020-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ~>
18
18
  - !ruby/object:Gem::Version
19
- version: '5.0'
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
- version: '5.0'
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: jquery-rails
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -254,14 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - ~>
256
256
  - !ruby/object:Gem::Version
257
- version: 2.4.0
257
+ version: '2.13'
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - ~>
263
263
  - !ruby/object:Gem::Version
264
- version: 2.4.0
264
+ version: '2.13'
265
265
  description: Coalla CMS gem
266
266
  email:
267
267
  - dev@coalla.ru
@@ -555,7 +555,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
555
555
  requirements:
556
556
  - - ! '>='
557
557
  - !ruby/object:Gem::Version
558
- version: 2.0.0
558
+ version: '2.3'
559
559
  required_rubygems_version: !ruby/object:Gem::Requirement
560
560
  requirements:
561
561
  - - ! '>='