only get registrations with answered question
This commit is contained in:
parent
d3e0066f88
commit
f420b10732
2 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ module Admin
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@registrations = @conference.registrations.joins(:qanswers).uniq
|
@registrations = @conference.registrations.joins(:qanswers).where(qanswers: { question: @question })
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
%td
|
%td
|
||||||
.btn-group
|
.btn-group
|
||||||
= link_to 'Show', admin_conference_question_path(@conference.short_title, q), class: 'btn btn-success'
|
= link_to 'Show', admin_conference_question_path(@conference.short_title, q), class: 'btn btn-success', disabled: !@conference.questions.include?(q)
|
||||||
= link_to 'Edit', edit_admin_conference_question_path(@conference.short_title, q),
|
= link_to 'Edit', edit_admin_conference_question_path(@conference.short_title, q),
|
||||||
class: 'btn btn-primary', disabled: !(can? :update, q)
|
class: 'btn btn-primary', disabled: !(can? :update, q)
|
||||||
= link_to 'Delete', admin_conference_question_path(@conference.short_title, q),
|
= link_to 'Delete', admin_conference_question_path(@conference.short_title, q),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue