releaf-core 1.0.8 → 1.0.9

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: 538481e57c3f24123c105f587d1d8c479eca0bd8
4
- data.tar.gz: 793115a36832068d18e15d31cfdc98b7a7995878
3
+ metadata.gz: 80038785fdfb4f3cd6953cf8e70884f177fb29fb
4
+ data.tar.gz: 515ceec9310d0ac7706ee4187bb5483fdcedf76e
5
5
  SHA512:
6
- metadata.gz: 7beed131ea67faca2aa6e570c69b5a46fcbc08480510bfcdf5916768172f31a326a2ed558ee7bd18f20600c7e2906f4db0e7b7cd38d7eaccbf29c03cbcaaa976
7
- data.tar.gz: d8e5e6979edb82acd8271230bf82fe213e0bb353bed76d6bd28f91627cdff0c1f1f50ce6b3144407494226f12a2153886872d92f983fb35346c29d31f6bcb20e
6
+ metadata.gz: f822a17bc731f947c6ac2a4810462cdf7f1c97ef70520da1ff28d6e285311835f73cc65a747c35234fce218d8d549c772af7fe4f25bcf2d13f56090469a41509
7
+ data.tar.gz: 47e38c8a88afbe0f7af83c596b074ec4e5511e8a6f1d8bdf361765b173c358174d70781fbfb67304d11a223675a2417818a76bb30c406dd183686204a4666827
@@ -0,0 +1,12 @@
1
+ class CreateBannerGroups < ActiveRecord::Migration
2
+ def change
3
+ create_table :banner_groups do |t|
4
+ t.integer :banner_page_id
5
+ t.integer :item_position
6
+ t.string :title
7
+ t.string :image_uid
8
+
9
+ t.timestamps(null: false)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,11 @@
1
+ class CreateBannerPages < ActiveRecord::Migration
2
+ def change
3
+ create_table :banner_pages do |t|
4
+ t.text :intro_text_html
5
+ t.string :top_banner_uid
6
+ t.string :bottom_banner_uid
7
+
8
+ t.timestamps(null: false)
9
+ end
10
+ end
11
+ end
@@ -1,10 +1,10 @@
1
1
  class CreateBanners < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :banners do |t|
4
- t.integer :home_page_id
5
- t.string :banner_uid
4
+ t.integer :banner_group_id
5
+ t.integer :item_position
6
+ t.string :image_uid
6
7
  t.string :url
7
-
8
8
  t.timestamps(null: false)
9
9
  end
10
10
  end
@@ -2,7 +2,6 @@ class CreateHomePages < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :home_pages do |t|
4
4
  t.text :intro_text_html
5
- t.string :banner_uid
6
5
 
7
6
  t.timestamps(null: false)
8
7
  end
@@ -1,5 +1,5 @@
1
1
  class Banner < ActiveRecord::Base
2
- dragonfly_accessor :banner
2
+ dragonfly_accessor :image
3
3
  validates_presence_of :url
4
- belongs_to :home_page
4
+ belongs_to :banner_group
5
5
  end
@@ -0,0 +1,8 @@
1
+ class BannerGroup < ActiveRecord::Base
2
+ dragonfly_accessor :image
3
+ validates_presence_of :title
4
+ belongs_to :home_page
5
+
6
+ has_many :banners, -> { order(:item_position) }, dependent: :destroy
7
+ accepts_nested_attributes_for :banners, allow_destroy: true
8
+ end
@@ -0,0 +1,7 @@
1
+ class BannerPage < ActiveRecord::Base
2
+ acts_as_node
3
+ has_many :banner_groups, -> { order(:item_position) }, dependent: :destroy
4
+ accepts_nested_attributes_for :banner_groups, allow_destroy: true
5
+ dragonfly_accessor :top_banner
6
+ dragonfly_accessor :bottom_banner
7
+ end
@@ -1,6 +1,3 @@
1
1
  class HomePage < ActiveRecord::Base
2
2
  acts_as_node
3
- has_many :banners, dependent: :destroy
4
- accepts_nested_attributes_for :banners, allow_destroy: true
5
- dragonfly_accessor :banner
6
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: releaf-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.8
4
+ version: 1.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - CubeSystems
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-31 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -462,6 +462,8 @@ files:
462
462
  - lib/generators/dummy/templates/controllers/text_pages_controller.rb
463
463
  - lib/generators/dummy/templates/initializers/releaf.rb
464
464
  - lib/generators/dummy/templates/migrations/create_authors.rb
465
+ - lib/generators/dummy/templates/migrations/create_banner_groups.rb
466
+ - lib/generators/dummy/templates/migrations/create_banner_pages.rb
465
467
  - lib/generators/dummy/templates/migrations/create_banners.rb
466
468
  - lib/generators/dummy/templates/migrations/create_book_sequels.rb
467
469
  - lib/generators/dummy/templates/migrations/create_books.rb
@@ -474,6 +476,8 @@ files:
474
476
  - lib/generators/dummy/templates/migrations/create_text_pages.rb
475
477
  - lib/generators/dummy/templates/models/author.rb
476
478
  - lib/generators/dummy/templates/models/banner.rb
479
+ - lib/generators/dummy/templates/models/banner_group.rb
480
+ - lib/generators/dummy/templates/models/banner_page.rb
477
481
  - lib/generators/dummy/templates/models/book.rb
478
482
  - lib/generators/dummy/templates/models/book_sequel.rb
479
483
  - lib/generators/dummy/templates/models/bundle.rb
@@ -630,7 +634,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
630
634
  version: '0'
631
635
  requirements: []
632
636
  rubyforge_project:
633
- rubygems_version: 2.5.1
637
+ rubygems_version: 2.6.10
634
638
  signing_key:
635
639
  specification_version: 4
636
640
  summary: core gem for releaf