Habtm relation, cannot populate join table

Hai friends,
I hav two models related with habtm

class User < ActiveRecord::Base
has_and_belongs_to_many :station,
:join_table => “stations_users”,
:foreign_key => “user_id”,
:association_foreign_key => “station_id”

class Station < ActiveRecord::Base
has_and_belongs_to_many :user

When i create a new user its user_id and the station _id is not inserted
into the “stations_users” table.I hav used scaffolding 4 creating these
two models.How can i insert the fields for the join table also when a
user is created?
Can any one help me?

Thanks and regards,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs