MODIFIED QUESTION:
I have an application that has 2 tables: Curso
and Cargo
and a third table curso_cargo
that makes the HBTM
between them. I would like to know how to access a field of this curso_cargo
table, to include data in it by a text_field
?
I have an application that has 3 tables: Conhecimentos
, Cargo
and cursos_cargos
.
create_table :cargos do |t|
t.integer :id
t.string :nome
t.text :missao
t.text :atribuicoes
t.text :formacao
t.text :experiencia
t.references :setor
t.timestamps
end
create_table :conhecimentos do |t|
t.string :nome
t.timestamps
end
create_table :conhecimentos_responsabilidades, :id => false, :force => true do |t|
t.references :cargo
t.references :conhecimento
t.references :nivel
end
In this last table, I have a level_id field, which will store a one-level id for each knowledge registered for that job. This field will be in view
of Positions, which will display what the existing knowledge and level of knowledge.
How do I create form
, indicating that Cargo
, has a conhecimento
with nível
x?