ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-rails
ruby-rails
Re: [Rails] Active Record problem
by Andrew Stone other posts by this author
Aug 31 2005 4:27AM messages near this date
[Rails] Active Record problem | [Rails] strange difference between has_one and has_many
Nadav,

I haven't worked much with has_and_belongs_to_many but I think if you change 
the line

has_and_belongs_to_many :operations

--to--

has_and_belongs_to_many :operations, :join_table =>  "operations_users"

you should be able to access all operations for a user by @user.operations

Again, not sure...but this seems like this is the correct way to do it.



-- 
Andrew Stone
Attachments:
unknown1
unknown2
unknown3
unknown4

Thread:
Nadav Blum
Andrew Stone

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved