Posts by Nelson Haraguchi • 26 points
2 posts
-
0
votes1
answer817
viewsA: How do I make the relationship many for many in Ruby on Rails with has and belongs to Many?
You create a table categories_systems create_table :categorias_sistemas, id: false do |t| t.belongs_to :categoria, index: true t.belongs_to :sistema, index: true end and both in the Category class…
-
1
votes1
answer82
viewsA: Adding features to a Model that depend on the Controller or View
My solution would be to create the methods: can_be_showed_by(current_user) can_be_edited_by(current_user) and can_be_destroyed_by(current_user) and that way you can use the logged in user and you…