so to use your statement, I should put the following in my Associate
model?
belongs_to :watching_channel, :class_name = Channel, :foreign_key
=
watching_channel_id
-Janna B
On Jul 17, 1:09 am, Rodrigo Dominguez rails-mailing-l...@andreas-
s.net wrote:
Janna Brossard wrote:
yes,
That should work.
Cheers,
Nicholas
On Jul 17, 8:47 am, JannaB mistressja...@hotmail.com wrote:
so to use your statement, I should put the following in my Associate
model?
belongs_to :watching_channel, :class_name = Channel, :foreign_key
=
watching_channel_id
-Janna B
On Jul 17, 1:09
I'm not sure, but you probably should rewrite that:
if @channel.nil? !current_associate.watching_channel_id.nil?
current_associate.watching_channel_id 0
better still why are you checking if watching_channel_id is gt 0? Is
watching_channel_id a foreign key for an association for watching
yes, current_associate.watching_channel_id IS a foreign key to
channel.id. But I have not specified it as such in the associate model
or the channel model (not sure how -- or if I even need to!) -Janna
On Jul 16, 8:56 pm, Nicholas Henry nicholas.he...@gmail.com wrote:
I'm not sure, but you
Janna Brossard wrote:
yes, current_associate.watching_channel_id IS a foreign key to
channel.id. But I have not specified it as such in the associate model
or the channel model (not sure how -- or if I even need to!) -Janna
if the class name is WatchingChannel, the it will work
belongs_to
5 matches
Mail list logo