Hi there !
This is my first post here and as a newbie I hope my question won't be to dumb.
I like rails because of its clean syntax (thank you ruby!) but it is so big that I can't figure how doing my stuff done…
I have the following table technics :
create_table :technics do |t| t.belongs_to :master, index: true t.belongs_to :body_part, index: true t.string :name t.text :explanation end
I would like to be able to create and display technic's variant.
A technic has many variants but it is also the variation of many others so I thought using a has_and_belongs_to_many :variants association.
I could also identify the variants as they have the same master_id & body_part_id so I tried to use a scope.
I also tried to follow that : http://stackoverflow...-model-in-rails
In the end I'm always finding myself stuck…
The only thing nice I like so far is my resource routes as this is exactly what I need :
resources :technics resources :variants, shallow: true end
But I think I would need a variants table to make it works ?
As you see I am really lost so if anyone could help me it would be really cool !!