Hi --

On Fri, 28 Aug 2009, Bryan Ash wrote:

>
> In my application a user working at a dropzone can manipulate
> transactions against customer accounts.  Here's my models:
>
> class Transaction < ActiveRecord::Base
>  belongs_to :account
> end
>
> class Account < ActiveRecord::Base
>  belongs_to :dropzone
>  has_many   :transactions
> end
>
> class Dropzone < ActiveRecord::Base
>  has_many :transactions, :through => :accounts do
>    def limited_to(transaction)
>      scope = Transaction.scoped({ :conditions =>
> ['account.dropzone_id = ?', proxy_owner.id],

That should be accounts (plural) I suspect.


David

-- 
David A. Black / Ruby Power and Light, LLC / http://www.rubypal.com
Ruby/Rails training, mentoring, consulting, code-review
Latest book: The Well-Grounded Rubyist (http://www.manning.com/black2)

September Ruby training in NJ has been POSTPONED. Details to follow.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to