railhead_permalink 0.1.13 → 0.1.14

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.
@@ -35,7 +35,7 @@ module RailheadPermalink
35
35
 
36
36
  module InstanceMethods
37
37
  def create_permalink
38
- if self.permalink.nil? or not permalink_options[:keep_existing]
38
+ if self.permalink.nil? or (self.changed.include?(permalink_options[:field]) and not permalink_options[:keep_existing])
39
39
  key = self[permalink_options[:field]].parameterize.to_s
40
40
  unless self.permalink == key
41
41
  permalink, counter = key, '-1'
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "railhead_permalink"
3
- s.version = "0.1.13"
4
- s.date = "2010-03-06"
3
+ s.version = "0.1.14"
4
+ s.date = "2010-06-07"
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"
@@ -16,3 +16,4 @@ Gem::Specification.new do |s|
16
16
  s.rdoc_options = ["--main", "README.rdoc"]
17
17
  s.extra_rdoc_files = ["README.rdoc"]
18
18
  end
19
+
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railhead_permalink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bence Nagy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-03-06 00:00:00 +01:00
12
+ date: 2010-06-07 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15