On 24 March 2015 at 18:50, Gm wrote:
> Hi,
>
> I'm using habtm to create a relationship between two models:
>
> class Question < ActiveRecord::Base
> has_and_belongs_to_many :exams
> end
>
> class Exam < ActiveRecord::Base
> has_and_belongs_to_many :questions
> end
>
> At some point I'm doing
Hi,
I'm using habtm to create a relationship between two models:
class Question < ActiveRecord::Base
has_and_belongs_to_many :exams
end
class Exam < ActiveRecord::Base
has_and_belongs_to_many :questions
end
At some point I'm doing this:
class Exam < ActiveRecord::Base
has_and_belongs_to
Hi I have a post and a category model
class Post < ActiveRecord::Base
has_and_belongs_to_many :categories
end
class Category < ActiveRecord::Base
has_and_belongs_to_many :posts
end
I created join table migration files
Now I wanna create category while creating post I mean user can choose
category
3 matches
Mail list logo