Module: Slugs::ActiveRecord::Finders::ClassMethods

Defined in:
lib/slugs/active_record/finders.rb

Instance Method Summary collapse

Instance Method Details

#sluggedObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/slugs/active_record/finders.rb', line 7

def slugged
  all.extending do

    def find(*args)
      find_by_slug args.first
    end

    def exists?(*args)
      exists_by_slug? args.first
    end

  end
end