Displaying 2 results from an estimated 2 matches for "fkpresentationid".
2006 Mar 18
4
new user.presentation
Hi,
I''m creating an RoR application right now and i''ve got the following
question:
An user has one presentation.
So i''ve got an user table and in that table is an field
fkPresentationID. Now i want to create an new user and at the same
moment an new presentation for that user. I thought it would work with
something like this, but it didn''t work.
@user = User.new(params[:user])
@user.presentation.new(params[:presentation])
if @user.save
flash[:notice] = ''OK...
2006 Apr 01
3
has_and_belongs_to_many construction
...ant to get all the presentations that are in state emailed.
I now got in my contactstate model has_and_belongs_to_many
:presentation, :join_table => ''presentationcontactstates'', :foreign_key
=> ''fkcontactstateID'', :association_foreign_key => ''fkpresentationID''
So with Contactstate.find(:all, conditions => ''contactstate IN
(1,3,6)'').presentations i''ve got them. But now i want to filter those
results with for example city = ''New York''
There i get stuck...
Does anyone know how to do this?
Thank...