Skip to content

Commit

Permalink
Fix for rake tasks to be able to process string IDs, not only integer…
Browse files Browse the repository at this point in the history
… ones
  • Loading branch information
ifesdjeen committed Dec 26, 2010
1 parent 6d235eb commit ec6492b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/friendly_id.rake
Expand Up @@ -2,7 +2,7 @@ namespace :friendly_id do
desc "Make slugs for a model."
task :make_slugs => :environment do
FriendlyId::TaskRunner.new.make_slugs do |record|
puts "%s(%d): friendly_id set to '%s'" % [record.class.to_s, record.id, record.slug.name] if record.slug
puts "#{record.class.to_s}(#{record.id}): friendly_id set to '#{record.slug.name}'" if record.slug
end
end

Expand All @@ -16,4 +16,4 @@ namespace :friendly_id do
task :remove_old_slugs => :environment do
FriendlyId::TaskRunner.new.delete_old_slugs
end
end
end

0 comments on commit ec6492b

Please sign in to comment.