File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1515 <% @exercises . each do |exercise | %>
1616 < tr >
1717 < td > <%= link_to exercise . title , exercise %> </ td >
18- <% if defined? exercise . user %>
19- <% if exercise . user . first_name . nil? %>
20- < td > <%= link_to "User#{ exercise . user . id } " , user_path ( exercise . user ) %> </ td >
21- <% else %>
22- < td > <%= link_to exercise . user . name , user_path ( exercise . user ) %> </ td >
23- <% end %>
24- <% else %>
18+ <% if !exercise . user %>
2519 <%= 'User undefined' %>
20+ <% elsif exercise . user . first_name . nil? %>
21+ < td > <%= link_to "User#{ exercise . user . id } " , user_path ( exercise . user ) %> </ td >
22+ <% else %>
23+ < td > <%= link_to exercise . user . name , user_path ( exercise . user ) %> </ td >
2624 <% end %>
2725 < td > <%= exercise . created_at %> </ td >
2826 < td > <%= exercise . public ? 'public' : 'private' %> </ td >
Original file line number Diff line number Diff line change 1515 get 'sessions/destroy'
1616
1717 get 'comments/comments_all'
18+ get 'exercises/exercises_all'
1819
1920 get 'exercises/:id/duplicate' , to : 'exercises#duplicate' , as : 'duplicate_exercise'
2021
3536 end
3637 end
3738
38- get 'exercises/exercises_all'
39-
4039
4140
4241
Original file line number Diff line number Diff line change 110110 t . integer "exercise_id"
111111 t . datetime "created_at" , null : false
112112 t . datetime "updated_at" , null : false
113+ t . string "file_name"
113114 end
114115
115116 add_index "exercise_files" , [ "exercise_id" ] , name : "index_exercise_files_on_exercise_id"
You can’t perform that action at this time.
0 commit comments