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