passing a parameter from an other model on ruby
- by MAGE
I'm very newbie in ruby and need your help.
I must save a "Topic" and make it like this :
@topic = Topic.new(params[:topic])
But I would like to pass an other information to this topic. It has a field "community_id" that link it to a community.
The logged user has this information on his table.
How can I pass the "community_id" from the logged user to the "community_id" of the "topic" created ?
thx for your help