Sha256: 172c44e3bfd47aeee014e0606260df6b386ba9d6fbcf6cad3c0ba5c60c676d2b

Contents?: true

Size: 1.04 KB

Versions: 24

Compression:

Stored size: 1.04 KB

Contents

<% @search_results.each do |result|
	_partial = "auth/search/search_result.html.erb"
	if result.respond_to? :walk_superclasses
		result_superclass = result.walk_superclasses
		if result_superclass.to_s =~ /^Auth::/
			## lookup the view of the base class first.
			## if that doesnt exist, try the auth class
			## if that also doesnt exist, then render the base
			## search result view.
			search_path = Auth::OmniAuth::Path.model_to_path(result.class) + "/_search_result.html.erb"
			
			if lookup_context.find_all(search_path).any?

				_partial = search_path
				
			else
				search_path = Auth::OmniAuth::Path.model_to_path(result_superclass) + "/_search_result.html.erb"

				
				if lookup_context.find_all(search_path).any?
					_partial = search_path
				else
					
				end
			end
		else

		end	
	else
		
	end


	_partial = _partial.gsub(/\/_search/,"/search")
	##now render this partial.
%>
	
	
	$("#navbar_search_results").append("<%= escape_javascript render :partial => _partial, locals: {result: result, resource: lookup_resource} %>")

<%

end

%>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
wordjelly-auth-1.2.2 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.2.1 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.2.0 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.9 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.8 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.7 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.6 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.5 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.4 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.3 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.2 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.1 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.1.0 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.0.9 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.0.8 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.0.5 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.0.4 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.0.3 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-1.0.2 app/views/auth/search/authenticated_user_search.js.erb
wordjelly-auth-0.0.8 app/views/auth/search/authenticated_user_search.js.erb