effective_posts 0.6.1 → 0.6.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2d902aeb10c1c3b6086f2906b32ed4630a4f42837e8d9026b21f8b86057d447f
4
- data.tar.gz: 524d6be015661d16c72e3937bda35566d278e7d26b7a0d4eda321896613bd8b8
3
+ metadata.gz: d24520205ad7c50a0c2b87db4f98973823d6ce0019121100552f5f6e9acb37ba
4
+ data.tar.gz: b741010f991174f86dec40373f44d62e82c58112adf8bed342a7cb01e10a6826
5
5
  SHA512:
6
- metadata.gz: ad28ff26d3d39f18666da90cd4bb7c7274785b1a8b6323d5190732661aa1e72e950128b488471b7aafd1e1e28023ad19ccde4a486ae83912813c0905eef9a4b7
7
- data.tar.gz: 74f3535129b89d932ddb941501aa818134d6813742234af6cdefb157be6c8d141fe6daa29882767a89d196c90ae89e593750bd0864b4ea53f3dcd659e4ffce5a
6
+ metadata.gz: 28729dbb2aea8030f3c558e986c2002de9c40b6b7566e40ab07a9d8f7b8c16c13aa29ffa815f2cf9c8843e44fa86c9be0ed69c54b637ba56e93a1f9121404298
7
+ data.tar.gz: 1399466d936f9210462d3f07cdd7f49b994ad897be35ea34f32355bc04f151287e51425063dd5b4e14b84421886d41cda5c311f2588f2ecba501d14a5e2ee205
@@ -8,7 +8,7 @@ module EffectivePostsHelper
8
8
  if EffectivePosts.use_category_routes
9
9
  effective_posts.post_path(post, opts).sub('/posts', "/#{category}")
10
10
  else
11
- effective_posts.post_path(post, opts.merge(category: category))
11
+ effective_posts.post_path(post, opts)
12
12
  end
13
13
  end
14
14
 
@@ -33,7 +33,6 @@ module Effective
33
33
 
34
34
  scope :drafts, -> { where(draft: true) }
35
35
  scope :published, -> { where(draft: false).where("#{EffectivePosts.posts_table_name}.published_at < ?", Time.zone.now) }
36
- scope :with_category, -> (category) { where(category: category.to_s.downcase) }
37
36
 
38
37
  scope :posts, -> (user: nil, category: nil, drafts: false) {
39
38
  scope = (Rails::VERSION::MAJOR > 3 ? all : scoped)
@@ -48,7 +47,7 @@ module Effective
48
47
  end
49
48
 
50
49
  if category.present?
51
- scope = scope.with_category(category)
50
+ scope = scope.where(category: category)
52
51
  end
53
52
 
54
53
  if drafts.blank?
@@ -1,3 +1,3 @@
1
1
  module EffectivePosts
2
- VERSION = '0.6.1'.freeze
2
+ VERSION = '0.6.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_posts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-16 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  - !ruby/object:Gem::Version
204
204
  version: '0'
205
205
  requirements: []
206
- rubygems_version: 3.0.3
206
+ rubygems_version: 3.1.2
207
207
  signing_key:
208
208
  specification_version: 4
209
209
  summary: A blog implementation with WYSIWYG content editing, post scheduling, pagination