railhead_permalink 0.1.19 → 0.1.20

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c45bacad90eee842185fdaf40032c86137969288
4
+ data.tar.gz: 3516d607f05ca2652f1233ebc40d66f0ce3bef28
5
+ SHA512:
6
+ metadata.gz: 8a3f3928b06a98c57155c54f278af0e121ac448ddbda55c6228fe32c1a8e9f048f86d4708212f4132d519ad12b9d001da1897aeac46db846f289f7865e971a59
7
+ data.tar.gz: bd0e074bafbca898a83353d4c0b728a421a04c6b1010e17864f4c7dba55de19000a50e59c3f25ad4efee9a62af435d18920ab91d51ec5b069f1c9c4a5ee4b1bd
@@ -28,7 +28,7 @@ module RailheadPermalink
28
28
  def find_with_permalink(*args)
29
29
  key = args.first
30
30
  if key.is_a?(String)
31
- find_without_permalink(:first, :conditions => {:permalink => key}) || find_without_permalink(*args)
31
+ where(:permalink => key).first || find_without_permalink(*args)
32
32
  else
33
33
  find_without_permalink(*args)
34
34
  end
@@ -42,7 +42,7 @@ module RailheadPermalink
42
42
  unless self.permalink == key
43
43
  permalink, counter = key, '-1'
44
44
  while permalink_options[:reserved_names].include?(permalink) or permalink.blank? or
45
- (object = self.class.find_without_permalink(:first, :conditions => {:permalink => permalink}) and object != self)
45
+ (object = self.class.where(:permalink => permalink).first and object != self)
46
46
  counter.succ!
47
47
  permalink = key + counter
48
48
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "railhead_permalink"
3
- s.version = "0.1.19"
4
- s.date = "2012-07-12"
3
+ s.version = "0.1.20"
4
+ s.date = "2013-11-24"
5
5
  s.summary = "RailheadPermalink is a Ruby on Rails plugin that automatically finds ActiveRecord objects with permalink."
6
6
  s.email = "nagybence@tipogral.hu"
7
7
  s.homepage = "http://github.com/nagybence/railhead_permalink"
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railhead_permalink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
5
- prerelease:
4
+ version: 0.1.20
6
5
  platform: ruby
7
6
  authors:
8
7
  - Bence Nagy
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2012-07-12 00:00:00.000000000 Z
11
+ date: 2013-11-24 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: RailheadPermalink is a Ruby on Rails plugin that automatically finds
15
14
  ActiveRecord objects with permalink.
@@ -26,6 +25,7 @@ files:
26
25
  - lib/railhead_permalink.rb
27
26
  homepage: http://github.com/nagybence/railhead_permalink
28
27
  licenses: []
28
+ metadata: {}
29
29
  post_install_message:
30
30
  rdoc_options:
31
31
  - --main
@@ -33,22 +33,20 @@ rdoc_options:
33
33
  require_paths:
34
34
  - lib
35
35
  required_ruby_version: !ruby/object:Gem::Requirement
36
- none: false
37
36
  requirements:
38
- - - ! '>='
37
+ - - '>='
39
38
  - !ruby/object:Gem::Version
40
39
  version: '0'
41
40
  required_rubygems_version: !ruby/object:Gem::Requirement
42
- none: false
43
41
  requirements:
44
- - - ! '>='
42
+ - - '>='
45
43
  - !ruby/object:Gem::Version
46
44
  version: '0'
47
45
  requirements: []
48
46
  rubyforge_project:
49
- rubygems_version: 1.8.24
47
+ rubygems_version: 2.0.6
50
48
  signing_key:
51
- specification_version: 3
49
+ specification_version: 4
52
50
  summary: RailheadPermalink is a Ruby on Rails plugin that automatically finds ActiveRecord
53
51
  objects with permalink.
54
52
  test_files: []