Skip to content

Instantly share code, notes, and snippets.

Process: AdobeCrashDaemon [40344]
Path: /Applications/Adobe Photoshop CC/Adobe Photoshop CC.app/Contents/Frameworks/AdobeCrashReporter.framework/Required/AdobeCrashDaemon.app/Contents/MacOS/AdobeCrashDaemon
Identifier: AdobeCrashDaemon
Version: 7.0.1
Code Type: X86-64 (Native)
Parent Process: launchd [1]
Responsible: AdobeCrashDaemon [40344]
User ID: 501
Date/Time: 2014-05-25 18:33:45.844 +0200
/Library/Ruby/Gems/2.0.0/gems/activerecord-4.0.3/lib/active_record/dynamic_matchers.rb:22:in `method_missing': undefined method `devise' for #<Class:0x007fb2ec5830d0> (NoMethodError)
from /Users/Nicolas/EspaceMagic/app/models/user.rb:22:in `<class:User>'
from /Users/Nicolas/EspaceMagic/app/models/user.rb:1:in `<top (required)>'
Card has many Card Types through a join table
Deck has many Cards through a join table
Category has many Card Types
<% categories.each do |category| %>
<% card_ids = [] %>
<% cards = Card.joins(:card_types).where(card_types: {id: category.card_type_ids}) %>
<% cards.find_each do |card| %>
<% card_ids << card.id unless card_ids.include?(card.id) %>
<% end %>
<% category_cards = @main_cards.where(card_id: [card_ids]) %>
<% end %>