Permalink
Browse files

unless -> if

  • Loading branch information...
1 parent 7d14793 commit f3dc370831d13670ac373b7847838e85ade1219c @slbug slbug committed with norman Dec 5, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/friendly_id/active_record.rb
@@ -10,12 +10,12 @@ module ActiveRecordAdapter
include FriendlyId::Base
def has_friendly_id(method, options = {})
- unless FriendlyId.on_ar3?
- class_inheritable_accessor :friendly_id_config
- write_inheritable_attribute :friendly_id_config, Configuration.new(self, method, options)
- else
+ if FriendlyId.on_ar3?
class_attribute :friendly_id_config
self.friendly_id_config = Configuration.new(self, method, options)
+ else
+ class_inheritable_accessor :friendly_id_config
+ write_inheritable_attribute :friendly_id_config, Configuration.new(self, method, options)
end
if friendly_id_config.use_slug?

0 comments on commit f3dc370

Please sign in to comment.