I am new to rails and I been using asociations for 1-2 weeks with no issues so far, but this time I need to use them from the start..
all the examples online are with "already" data in the data base to create a new record with the associations working..
in my case obviosly if you have no data at all only the scheme and I want to fill in the form and create a new record that will write to the both models associated, but I am trying all possible ways in the console before I even bother with the new.html.erb view and im banging my head.
any help will be apreciated here is the info:
class Calendario < ActiveRecord::Base
class Tarea < ActiveRecord::Base
ActiveRecord::Schema.define(:version => 20080810072747) do
create_table "calendarios", :force => true do |t|
create_table "tareas", :force => true do |t|
in the console I am trying:
tarea.calendario = Calendario.create
tarea.calendario = Calendario.new
then the reverse just in case
calendario.tarea = Tarea.new
calendario.tarea = Tarea.create
I as well have try the mothods the association supposed to create with no luck
I know I am doing something very wrong but since I am a noob the mix of info from my book and google search is confusing me even more with alike situation but none just like mine.