Sha256: 0f6fe162185c70a4ed50ba69db2f1193926e56814306650714f1ff91ebcc7ae1

Contents?: true

Size: 270 Bytes

Versions: 9

Compression:

Stored size: 270 Bytes

Contents

module Partisan
  module FollowHelper

  private

    # Retrieves the parent class name if using STI.
    def parent_class_name(obj)
      klass = obj.class
      klass = klass.superclass while klass.superclass != ActiveRecord::Base

      klass.name
    end

  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
partisan-0.4 lib/partisan/follow_helper.rb
partisan-0.3 lib/partisan/follow_helper.rb
partisan-0.2.3 lib/partisan/follow_helper.rb
partisan-0.2.2 lib/partisan/follow_helper.rb
partisan-0.2.1 lib/partisan/follow_helper.rb
partisan-0.2 lib/partisan/follow_helper.rb
partisan-0.1.1 lib/partisan/follow_helper.rb
partisan-0.1 lib/partisan/follow_helper.rb
partisan-0.0.1 lib/partisan/follow_helper.rb