blacksand 2.3.0 → 2.4.0

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: df2f22e7f167937074f2c7076a5d5094238b5ea2
4
- data.tar.gz: b457ab9c47ee7641fba04b03f1d723feb14b9789
3
+ metadata.gz: 1b37cb94eb929124f4043cbe4034c30503feba5d
4
+ data.tar.gz: 0f7743f247617a8457eb674b5a356b0867333517
5
5
  SHA512:
6
- metadata.gz: cf617391fd30df099a5aede13eb77732a678803d66169bfa18db468aa6cd92ff8ad386fa700309a43a146eabb491eb7916451308a23f4f43575938a73d710efa
7
- data.tar.gz: e4e27591fd4391e8dcedcb1a94299f4a88b2bf3b9fcb2a708f40ba1d7e4bac230103ca6300509aab8406639cfdea37c4728d3b17f0ec290fc52191eb077afdf8
6
+ metadata.gz: 6338af588d9a80488593b07921b2b7343d04499be8f4d147f2e522c893e2b8e6bba6a21614ee53b0537e2604e54193b4a9e34c2a595224a2609a195278ac1ad0
7
+ data.tar.gz: 40f5058bfb3fb96d3d1a9bab1245d99c41f6f4ab1146d6a43bdb46487e1344d8d3d5272af9e844816e03df4ff314ab8b5e04871dce0f7a126f1cbe797e52f079
@@ -9,6 +9,7 @@ module Blacksand
9
9
  validates :options, presence: true, if: 'select?'
10
10
 
11
11
  enumerize :field_type, in: %w{date number string textarea rich_text image gallery array slide file select page}
12
+ serialize :options, JSON
12
13
 
13
14
  default_scope { order(:id) }
14
15
 
@@ -8,6 +8,7 @@ module Blacksand
8
8
  # ref: https://github.com/carrierwaveuploader/carrierwave/issues/1545
9
9
  #
10
10
  # mount_uploaders :gallery, ImageUploader
11
+ serialize :gallery, JSON
11
12
 
12
13
  belongs_to :page
13
14
  belongs_to :field
@@ -1,5 +1,6 @@
1
1
  module Blacksand
2
2
  class Prototype < ActiveRecord::Base
3
+ serialize :options, JSON
3
4
  store_accessor :options, :preferred_child_template_name, :preferred_child_prototype_name
4
5
 
5
6
  has_many :fields, dependent: :destroy
@@ -1,5 +1,6 @@
1
1
  module Blacksand
2
2
  class Template < ActiveRecord::Base
3
+ serialize :options, JSON
3
4
  store_accessor :options, :preferred_child_template_name, :preferred_child_prototype_name
4
5
 
5
6
  validates :name, :path, presence: true
@@ -5,7 +5,7 @@ class CreateFields < ActiveRecord::Migration
5
5
  t.string :description
6
6
  t.string :field_type
7
7
  t.references :prototype, index: true, foreign_key: true
8
- t.json :options
8
+ t.string :options
9
9
  t.boolean :required, :default => false
10
10
 
11
11
  t.timestamps null: false
@@ -5,7 +5,7 @@ class CreateProperties < ActiveRecord::Migration
5
5
  t.references :page, index: true, foreign_key: true
6
6
  t.references :field, index: true, foreign_key: true
7
7
  t.string :type
8
- t.json :gallery
8
+ t.string :gallery
9
9
  t.string :image
10
10
  t.string :file
11
11
 
@@ -5,7 +5,7 @@ class CreateNavigations < ActiveRecord::Migration
5
5
  t.string :url
6
6
  t.integer :position, default: 0
7
7
  t.references :page, index: true, foreign_key: true
8
- t.json :options
8
+ t.string :options
9
9
 
10
10
  t.timestamps null: false
11
11
  end
@@ -1,6 +1,6 @@
1
1
  class AddOptionsToTemplateAndPrototype < ActiveRecord::Migration
2
2
  def change
3
- add_column :templates, :options, :json
4
- add_column :prototypes, :options, :json
3
+ add_column :templates, :options, :string
4
+ add_column :prototypes, :options, :string
5
5
  end
6
6
  end
@@ -1,3 +1,3 @@
1
1
  module Blacksand
2
- VERSION = "2.3.0"
2
+ VERSION = "2.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacksand
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bastengao