|mrturtle||I have a boolean attribute in one model that has a belongs_to relationship. When I do Person.find(1).father.temporary, I get false (which is wrong)|
when I try Person.find(26).temporary, I get true (26 is the father's ID)
|chjunior||mrturtle, what is wrong with this? @revendedor.ramos_atividade << RamoAtividade.create(:nome => r, :creado_por => @revendedor.codigo_cliente) unless r.blank?|
who wants free ruby on rails hosting?
|therealcr0bar||i want free colo|
|chjunior||orsonork, hum.... me =)|
|orsonork||i can give you space on my server|
|chjunior||orsonork, with DNS ?|
|mrturtle||If it's a has_many relationship (which it looks like it is since you're using a <<) I think you want to pluralize the association: @revendedor.ramos_atividades << RamoAtividade.create(:nome => r, :creado_por => @revendedor.codigo_cliente) unless r.blank?|
|orsonork||mrturtle: do you talk in spanish?|
|chjunior||mrturtle, well..... it's a has_and_belongs_to_many association =/|
|macographer||the pluralization of habtm relationships is kind of tricky|
or rather, it wasn't obvious to me.
but it's important.
|mrturtle||un poco. No practicar mucho pero quiero usarlo mas|
|macographer||what is your join table called, chjunior .|
|chjunior||macographer, mrturtle: I dislike pluralization cause I'm brazilian and my code is in portuguese, my tables and columns too, so I always turns it off.... in this project it's not different|
|mrturtle||hmm...i'm not sure if I can help if you've customized stuff.|
|macographer||my habtm relationship was fixed as soon as i pluralized things correctly.|
i followed that example in the wiki, and had everything correct except the pluralization of the join table, if i remember correctly.
|therealcr0bar||do I need to do anything special if I developed an app with rails 1.1.6 and then installed 1.2.3|
|macographer||my guess is that rails needs the pluralization to do all of the automagical things related to the habtm relationship.|
|therealcr0bar||when I update RAILS_GEM_VERSION i get all sorts of weird errors when I try to run a console|
|macographer||chjunior: you know you can customize the pluralization of words, right?|
chjunior: have you tried doing a has_many :through relationship instead?
|chjunior||macographer, mrturtle: look this: http://paste.milk-it.net/321|
macographer, I know, but it's really not necessary
|macographer||i don't understand.|
|chjunior||macographer, witch part?|
|macographer||what's not working?|
|orsonork||ok, another try: free ruby on rails hosting - no ads, 200 MB disk space, 1 GB bandwidth, shell access, rails 1.2.2, 1 mysql db, php5, perl & python|
contact me now firstname.lastname@example.org
|chjunior||macographer, well, the generated SQL is completely wrong.... cause it's not adding the fields....|
|tpope||feh, why not 1.2.3?|