class EnsureActiveUser

  class << self

    def before(c) # c = controller
      return unless c.current_user
      if (c.current_user.pending? && c.current_user.has_circles? && !on_pending_member_page?(c))
        c.redirect_to pending_member_page_path(c.current_user.primary_circle)
      end
    end

    private

    def on_pending_member_page?(c)
      c.request.fullpath == pending_member_page_path(c)
    end
    
    def pending_member_page_path(c)
      circle = c.current_user.primary_circle
      c.membership_pending_public_circle_path(circle)
    end

  end

end
class EnsureActiveUser

  class << self

    def before(c) # c = controller
      return unless c.current_user
      if (c.current_user.pending? && c.current_user.has_circles? && !on_pending_member_page?(c))
        c.redirect_to pending_member_page_path(c)
      end
    end

    private

    def on_pending_member_page?(c)
      c.request.fullpath == pending_member_page_path(c)
    end
    
    def pending_member_page_path(c)
      circle = c.current_user.primary_circle
      c.membership_pending_public_circle_path(circle)
    end

  end

end
Revert "fix parameter to redirect route on pending user"
Revert "fix parameter to redirect route on pending user"

This reverts commit ed27e23d08a1cac6e11b99eaa36e60b45808f2f3.
