railroady icon indicating copy to clipboard operation
railroady copied to clipboard

rails 4 has_and_belongs_to_many not showing up correctly in models diagram

Open dstull opened this issue 10 years ago • 0 comments

see app model: class App < ActiveRecord::Base has_and_belongs_to_many :gateways

see gateway model: class Gateway < ActiveRecord::Base has_and_belongs_to_many :apps

in between these 2 models is a join table 'apps_gateways' with no ID

on the diagram the apps_gateways shows up as 2 models/tables

  1. for app association shows 'AppsGateway' with an app has many relationship to it
  2. for gateway association shows 'GatewaysApp' with a gateway has many relationship to it

the join table should show up between the 2 models instead...only once!

dstull avatar Jul 21 '14 14:07 dstull