Sha256: e2e42e9998ee60cd436cb40940e83de976ecc240b99c574675d460fc5c524db5

Contents?: true

Size: 745 Bytes

Versions: 3

Compression:

Stored size: 745 Bytes

Contents

require File.dirname(__FILE__) + '/test_helper'


#   scope :hello, :conditions => {"books.name" => "hello world"}
#   scope :friendly, lambda { |name| {:conditions => {"slugs.name" => name }, :include => :slugs}}
#
#   def self.find(*args, &block)
#     if FriendlyId::Finders::Base.friendly?(args.first)
#       puts "doing friendly find with #{args.first}"
#       self.friendly(args.shift).first(*args)
#     else
#       super
#     end
#   end
#
# end

module FriendlyId
  module Test
    module AcktiveRecord

      class StiTest < ::Test::Unit::TestCase

      #   def test_temp
      #     instance = Post.create(:name => "hello world")
      #     p instance.class.find(instance.friendly_id)
      #   end
      end

    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
friendly_id-3.0.0.beta3 test/acktive_record/temp_test.rb
friendly_id-3.0.0.beta2 test/acktive_record/temp_test.rb
friendly_id-3.0.0.beta1 test/acktive_record/temp_test.rb