| samsm | BucWheat: When you have a through=> :associationX there has to also be a has_many :associationX |
| leeh | BucWheat: go ahead, I'll try - but it is 4am |
| BucWheat | LeeH, samsm see my pastie http://pastie.caboo.se/42102 i have has_many :clients, through => :appointments |
| samsm | BucWheat: Get what I'm saying? Where's the has_many :appointments? |
| BucWheat | in appointments i have has_many :clients |
| leeh | you haven't set the relationship the other way ... |
| BucWheat | err in clients i mean |
| leeh | doctor has_many :appointments you need that |
| ziki18 | hello |
| leeh | with a :through, if you wanna use a nonstandard appointment sup ziki18 |
| ziki18 | I gots a problem (go figure) |
| someoneoutthere | hi guys |
| BucWheat | LeeH so doctor has_many :appointments, :through => :clients ? |
| ziki18 | I emailed all my project files home, even instantrails and radrails directories |
| leeh | i would think just "has_many :appointments" would do |
| BucWheat | LeeH then in appointments model do belongs_to :doctor ? |
| samsm | BucWheat: Find a has many through example somewhere and examine how yours is different. |
| leeh | yes if an appointment has a doctor_id column, it does indeed |
| ziki18 | and i go to run my app, and open up admin panel, which has before_filter :login_required. When i go to that admin view, i get redirected to account/login/:id.:format, which should actually just be account/login and show a login screen.... Using AAA |
| samsm | BucWheat: I'm a big fan of: http://svn.techno-weenie.net/projects/ |
| BucWheat | LeeH yea i have doctor_id in appointments table |
| someoneoutthere | can anyone tell me, if constants can be changed in ruby, then y do we need them? |
| leeh | BucWheat: try it, and get back to us |
| BucWheat | LeeH i already put it in :) |
| leeh | ziki18: don't know mate, mine worked fine, and I just installed A_A_A |
| BucWheat | LeeH so is my controller code proper to pull from apointment table? i did not get any errors this time but that doesn't really mean anything LeeH let me hack up some view code and i'll get back with you |
| leeh | Buc, what you are trying to do should be a HABTM relationship, with the middle table having it's own key, and being it's own associative instance |
| ziki18 | LeeH: it works great on my work computer, but bugged up when i went to transfer it |
| leeh | I'm trying to find the wiki page where it's discussed ziki18: rails version mismatch ? |
| ziki18 | LeeH: its the same exact files... |
| BucWheat | LeeH HABTM doesn't have primary key. has_many through does though |