# Models
Class InvoiceItem < ActiveRecord::Base
belongs_to :fee
end
Class Fee < ActiveRecord::Base
has_one :invoice_item
end
# Namedcope in Fee model
namedscope :uninvoiced, {
:conditions => "fees.id NOT IN (SELECT fee_id FROM invoice_items)"
}
Subscribe to:
Post Comments (Atom)
Blog Archive
-
▼
2010
(102)
-
▼
May
(10)
- Undo git add
- "No more PTYs. Sorry, could not find a PTY" error ...
- No root user created for mysql in Ubuntu Hardy
- Turning on ALT keys in Mac OS X Terminal
- Installing Hamachi on Mac OS X Snow Leopard
- Cannot pair up newly bought Aztech 109E with exist...
- 'BadAlloc (insufficient resources for operation)' ...
- Selecting GNU screen profile in Ubuntu Lucid Lynx
- Streaming radio using mplayer
- Finding uninvoiced fees in rails
-
▼
May
(10)
No comments:
Post a Comment