|
24 | 24 | <% end %> |
25 | 25 | </td> |
26 | 26 | <td> |
27 | | - <%= button_to 'Approve', approve_puzzle_path(puzzle), method: :patch, form_class: 'inline-form', class: 'approve-btn' %> |
28 | | - <%= button_to 'Reject', reject_puzzle_path(puzzle), method: :patch, form_class: 'inline-form', class: 'reject-btn' %> |
| 27 | + <%= button_to 'Approve', puzzle_state_path(puzzle, state: :approved), method: :patch, form_class: 'inline-form', class: 'approve-btn' %> |
| 28 | + <%= button_to 'Reject', puzzle_state_path(puzzle, state: :rejected), method: :patch, form_class: 'inline-form', class: 'reject-btn' %> |
29 | 29 | </td> |
30 | 30 | </tr> |
31 | 31 | <% end %> |
|
56 | 56 | <% end %> |
57 | 57 | </td> |
58 | 58 | <td> |
59 | | - <%= button_to 'Reject', reject_puzzle_path(puzzle), method: :patch, form_class: 'inline-form', class: 'reject-btn' %> |
60 | | - <%= button_to 'Pending', pending_puzzle_path(puzzle), method: :patch, form_class: 'inline-form', class: 'pending-btn' %> |
| 59 | + <%= button_to 'Reject', puzzle_state_path(puzzle, state: :rejected), method: :patch, form_class: 'inline-form', class: 'reject-btn' %> |
| 60 | + <%= button_to 'Pending', puzzle_state_path(puzzle, state: :pending), method: :patch, form_class: 'inline-form', class: 'pending-btn' %> |
61 | 61 | </td> |
62 | 62 | </tr> |
63 | 63 | <% end %> |
|
88 | 88 | <% end %> |
89 | 89 | </td> |
90 | 90 | <td> |
91 | | - <%= button_to 'Approve', approve_puzzle_path(puzzle), method: :patch, form_class: 'inline-form', class: 'approve-btn' %> |
92 | | - <%= button_to 'Pending', pending_puzzle_path(puzzle), method: :patch, form_class: 'inline-form', class: 'pending-btn' %> |
| 91 | + <%= button_to 'Approve', puzzle_state_path(puzzle, state: :approved), method: :patch, form_class: 'inline-form', class: 'approve-btn' %> |
| 92 | + <%= button_to 'Pending', puzzle_state_path(puzzle, state: :pending), method: :patch, form_class: 'inline-form', class: 'pending-btn' %> |
93 | 93 | </td> |
94 | 94 | </tr> |
95 | 95 | <% end %> |
96 | 96 | </tbody> |
97 | 97 | </table> |
98 | | - |
99 | 98 | <% else %> |
100 | 99 | <%= link_to 'Login with Google', '/auth/google_oauth2' %> |
101 | 100 | <% end %> |
|
0 commit comments