2013-07-13から1日間の記事一覧
今度は License の側から Employee のリストを取得してみましょう。 rails g controller licenses indexapp/views/licenses/index.html.erb <h1>資格取得者一覧</h1> <table border> <thead> <tr><th>資格</th><th>取得者</th></tr> </thead> <tbody> <% @licenses.each do |l| %> <tr> <td><%= l.name %></td> <td><%= l.employees.empty? ? 'なし' : l</td></tr></tbody></table>…