nateabbott-nateabbott-friendly_id 2.1.5 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
data/friendly_id.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{nateabbott-friendly_id}
5
- s.version = "2.1.5"
5
+ s.version = "2.1.6"
6
6
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
7
7
  s.authors = ["Norman Clarke", "Adrian Mugnolo", "Emilio Tagua", "Nate Abbott"]
8
8
  s.date = %q{2009-06-03}
@@ -101,12 +101,13 @@ module FriendlyId::SluggableInstanceMethods
101
101
  @most_recent_slug = nil
102
102
  slug_attributes = {:name => slug_text}
103
103
  if friendly_id_options[:scope]
104
- scope = self.class.friendly_id_options[:scope] # originally: scope = send(friendly_id_options[:scope])
104
+ # scope = self.class.friendly_id_options[:scope] # originally: scope = send(friendly_id_options[:scope])
105
+ scope = send(friendly_id_options[:scope])
105
106
  slug_attributes[:scope] = scope.respond_to?(:to_param) ? scope.to_param : scope.to_s
106
107
  end
107
108
  # If we're renaming back to a previously used friendly_id, delete the
108
109
  # slug so that we can recycle the name without having to use a sequence.
109
- # ORIG: slugs.find(:all, :conditions => {:name => slug_text, :scope => scope}).each { |s| s.destroy }
110
+ # ORIG slugs.find(:all, :conditions => {:name => slug_text, :scope => scope}).each { |s| s.destroy }
110
111
  slugs.find(:all, :conditions => {:name => slug_text, :scope => slug_attributes[:scope]}).each
111
112
  slug = slugs.build slug_attributes
112
113
  slug
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nateabbott-nateabbott-friendly_id
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Norman Clarke