redditor 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/redditor/page.rb +9 -9
- data/lib/redditor/version.rb +1 -1
- data/redditor.gemspec +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e068df1a9789fe7f9258f5826f7f875bac8e5441
|
4
|
+
data.tar.gz: 9e1dba5675f9156aff64c7100882a69a6860fde7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5d2c605852ca1556028a85a57bae097fbdcdbb0eacd5d3d14a82e57ca24bd09bda5a4ca34cf95e151928f6a458d1784e41465e96e42fc6cbabf17be875c2a27
|
7
|
+
data.tar.gz: e5fc8b7f6a1580863d7e125f4d90e62bcb392720673a2306117c3f9893bd110e90c25d42e534888c13f8ef77fc48e6486a70c5b0a37b7b50992ef66bfde61928
|
data/app/models/redditor/page.rb
CHANGED
@@ -6,16 +6,16 @@ module Redditor
|
|
6
6
|
|
7
7
|
# attr_accessible :pageable_id, :pageable_type, :metakey, :metadesc, :text_blocks_attributes, :video_blocks_attributes, :images_attributes, :slider_blocks_attributes
|
8
8
|
|
9
|
-
belongs_to :pageable, :
|
10
|
-
has_many :text_blocks, :
|
11
|
-
has_many :video_blocks, :
|
12
|
-
has_many :images, :
|
13
|
-
has_many :slider_blocks, :
|
9
|
+
belongs_to :pageable, polymorphic: true
|
10
|
+
has_many :text_blocks, class_name: "Redditor::TextBlock"
|
11
|
+
has_many :video_blocks, class_name: "Redditor::VideoBlock"
|
12
|
+
has_many :images, as: :imageable, class_name: "Redditor::Image"
|
13
|
+
has_many :slider_blocks, class_name: "Redditor::SliderBlock"
|
14
14
|
|
15
|
-
accepts_nested_attributes_for :text_blocks, :
|
16
|
-
accepts_nested_attributes_for :video_blocks, :
|
17
|
-
accepts_nested_attributes_for :slider_blocks, :
|
18
|
-
accepts_nested_attributes_for :images, :
|
15
|
+
accepts_nested_attributes_for :text_blocks, allow_destroy: true
|
16
|
+
accepts_nested_attributes_for :video_blocks, allow_destroy: true
|
17
|
+
accepts_nested_attributes_for :slider_blocks, allow_destroy: true
|
18
|
+
accepts_nested_attributes_for :images, allow_destroy: true
|
19
19
|
|
20
20
|
def self.model_name
|
21
21
|
ActiveModel::Name.new(self, nil, 'Page')
|
data/lib/redditor/version.rb
CHANGED
data/redditor.gemspec
CHANGED
@@ -25,6 +25,7 @@ Gem::Specification.new do |s|
|
|
25
25
|
s.add_dependency "rmagick"
|
26
26
|
s.add_dependency "coffee-rails"
|
27
27
|
s.add_dependency "jquery-rails"
|
28
|
+
# s.add_dependency 'fileapi', git: 'git@github.com:redde/fileapi.git'
|
28
29
|
|
29
30
|
s.add_development_dependency 'jquery-rails'
|
30
31
|
s.add_development_dependency 'capybara'
|