Skip to content

Instantly share code, notes, and snippets.

@kevn
Created July 23, 2011 00:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevn/1100720 to your computer and use it in GitHub Desktop.
Save kevn/1100720 to your computer and use it in GitHub Desktop.
memoize ymodule applications
TypeError in Groups#show
Showing app/views/layouts/_nav_menu.html.erb where line #207 raised:
class ActiveRecord::Associations::BelongsToAssociation needs to have method `_load'
Extracted source (around line #207):
204:
205: <li>
206: <ul class="ymodules-nav-list yj-hidden-nav">
207: <% current_user.installed_ymodule_applications.each do |application| -%>
208: <% next if application.app_id == "link" and !current_network.use_link_dir? %>
209: <% next if !application.show_in_main_navigation? %>
210: <% isLinksPage = application.app_id == 'links' && params[:controller] == "links" %>
Trace of template inclusion: app/views/groups/show.html.erb
RAILS_ROOT: /Users/kevin/dev/workfeed
Application Trace | Framework Trace | Full Trace
/Users/kevin/dev/workfeed/vendor/gems/hybrid_memcache-0.1.1/lib/hybrid_memcache.rb:93:in `load'
/Users/kevin/dev/workfeed/vendor/gems/hybrid_memcache-0.1.1/lib/hybrid_memcache.rb:93:in `get'
/Users/kevin/dev/workfeed/lib/aspect.rb:48:in `call'
/Users/kevin/dev/workfeed/lib/aspect.rb:48:in `get'
/Users/kevin/dev/workfeed/lib/aspect.rb:57:in `call'
/Users/kevin/dev/workfeed/lib/aspect.rb:57:in `get'
/Users/kevin/dev/workfeed/app/models/network.rb:1663:in `_unmemoized_installed_ymodule_applications'
/Users/kevin/dev/workfeed/app/models/user.rb:2754:in `installed_ymodule_applications'
/Users/kevin/dev/workfeed/lib/aspect.rb:48:in `call'
/Users/kevin/dev/workfeed/lib/aspect.rb:48:in `installed_ymodule_applications'
/Users/kevin/dev/workfeed/lib/aspect.rb:57:in `call'
/Users/kevin/dev/workfeed/lib/aspect.rb:57:in `installed_ymodule_applications'
/Users/kevin/dev/workfeed/app/views/layouts/_nav_menu.html.erb:207:in `_run_erb_app47views47layouts47_nav_menu46html46erb_locals_nav_menu_object'
/Users/kevin/dev/workfeed/app/views/layouts/_nav_menu.html.erb:1:in `_run_erb_app47views47layouts47_nav_menu46html46erb_locals_nav_menu_object'
/Users/kevin/dev/workfeed/lib/extensions/timing_ext.rb:76:in `render'
/Users/kevin/dev/workfeed/app/views/groups/show.html.erb:3:in `_run_erb_app47views47groups47show46html46erb'
/Users/kevin/dev/workfeed/lib/extensions/timing_ext.rb:76:in `render'
/Users/kevin/dev/workfeed/lib/extensions/timing_ext.rb:76:in `render'
/Users/kevin/dev/workfeed/lib/extensions/timing_ext.rb:38:in `render'
/Users/kevin/dev/workfeed/app/controllers/groups_controller.rb:76:in `show'
Request
Parameters:
{"network_permalink"=>"leffler.com",
"id"=>"fuckckckckckck"}
Show session dump
Response
Headers:
{"Content-Type"=>"text/html",
"Set-Cookie"=>"yamtrak_id=917de1f6-b494-4417-b8b2-0fad2750140a; path=/; expires=Sat,
23-Jul-2011 04:06:12 GMT; HttpOnly",
"Cache-Control"=>"no-cache"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment