brightcontent-core 2.0.2 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock
CHANGED
@@ -5,19 +5,23 @@ module Brightcontent
|
|
5
5
|
extend ActiveSupport::Concern
|
6
6
|
|
7
7
|
module ClassMethods
|
8
|
-
def
|
9
|
-
@per_page_count
|
8
|
+
def per_page_count
|
9
|
+
@per_page_count ||= 30
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
@per_page_count
|
12
|
+
def per_page(number)
|
13
|
+
@per_page_count = number
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
17
17
|
private
|
18
18
|
|
19
19
|
def end_of_association_chain
|
20
|
-
|
20
|
+
if action_name == "index"
|
21
|
+
super.paginate(page: params[:page], per_page: self.class.per_page_count)
|
22
|
+
else
|
23
|
+
super
|
24
|
+
end
|
21
25
|
end
|
22
26
|
|
23
27
|
end
|
@@ -1,8 +1,5 @@
|
|
1
1
|
require "brightcontent/routes_parser"
|
2
2
|
|
3
|
-
class Blog ; end
|
4
|
-
class Article ; end
|
5
|
-
|
6
3
|
module Brightcontent
|
7
4
|
describe RoutesParser do
|
8
5
|
let(:engine_resources) { %w{sessions admin_users} }
|
@@ -30,5 +27,13 @@ module Brightcontent
|
|
30
27
|
it { should eq ["blogs"] }
|
31
28
|
end
|
32
29
|
|
30
|
+
context "duplicate resources" do
|
31
|
+
before do
|
32
|
+
routes_hash << {action: "index", controller: "brightcontent/blogs" }
|
33
|
+
end
|
34
|
+
|
35
|
+
it { should eq ["blogs"] }
|
36
|
+
end
|
37
|
+
|
33
38
|
end
|
34
39
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brightcontent-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -341,7 +341,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
341
341
|
version: '0'
|
342
342
|
segments:
|
343
343
|
- 0
|
344
|
-
hash: -
|
344
|
+
hash: -1697021567461287672
|
345
345
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
346
346
|
none: false
|
347
347
|
requirements:
|
@@ -350,7 +350,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
350
|
version: '0'
|
351
351
|
segments:
|
352
352
|
- 0
|
353
|
-
hash: -
|
353
|
+
hash: -1697021567461287672
|
354
354
|
requirements: []
|
355
355
|
rubyforge_project:
|
356
356
|
rubygems_version: 1.8.24
|