Displaying 5 results from an estimated 5 matches for "hbtm".
Did you mean:
hbm
2008 Apr 07
2
Simple active record issue. I must be missing something.
...d
Any suggestions on how to model this relationship without requiring
references to Project in the User table?
From a database table viewpoint I would like
create_table :projects do |t|
t.integer :lead_id
t.timestamps
end
The review team part seems like it could be done with HBTM.
Any thoughts?
Sean
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe f...
2006 Jan 28
1
Advice on Optimization, and where to put what?
...to get that information and then use the array from then on.
My question is.. how do I go about doing that and where would my code
be? In the Model? In the Controller? In a helper file? I also need some
help writing the actual ruby code to define an array of friend_id''s.
My User model HBTM Friends. So I can call my_user.friends.find(:all) and
it will return all of his/her friends. Does my_user.friends return an
array of only those friends that belong to my_user? If so, can I just
assign that to a variable in my User model and access it in my
controllers and views?
Any help would...
2007 Jul 22
4
single table inheritance problem
Hallo,
I am having a very strange Problem with STI in my application.
setup:
- two tables one called "wikis" on called "categories" with a hbtm
relationship.
- the wikis table is the sti one with a model PageWiki being extended
from Wiki (and the correspondig type column)
Following happens:
- server restart
- get :wikis, :show_pages
- in show_pages the first line says PageWiki.find(:all)
! Now I get the following error
LoadError in Wikis...
2006 Mar 17
1
Design / Pattern / Scaffold for has-and-belongs-to-many ?
Is there a standard practice for providing a UI into HBTM relationships?
I have a model User, and a model Training, and I need to manage both
relationships -- show me all the people that have training X, but also
show me all trainings user U has. And, of course, "Lookup this user and
then add/remove trainings for this person" or "Loo...
2006 Jan 27
2
User.already_friend_of(friend)?
I have a User model who HBTM Friends (class User). I would like to check
for the existance of a user in the friends table before actually adding
them (in case they were already added as a friend.)
I have a method called already_friend_of?(friend) defined in my User
model, but I am not sure how to define this method. I simp...