Clean up rating partials
This commit is contained in:
parent
73c5c3c97a
commit
9e10678542
10 changed files with 131 additions and 92 deletions
|
|
@ -46,7 +46,7 @@ module Admin
|
|||
@event_types = @program.event_types
|
||||
@comments = @event.root_comments
|
||||
@comment_count = @event.comment_threads.count
|
||||
@ratings = @event.votes.includes(:user)
|
||||
@votes = @event.votes.includes(:user)
|
||||
@difficulty_levels = @program.difficulty_levels
|
||||
@versions = @event.versions |
|
||||
PaperTrail::Version.where(item_type: 'Commercial').where('object LIKE ?', "%commercialable_id: #{@event.id}\ncommercialable_type: Event%") |
|
||||
|
|
@ -146,7 +146,7 @@ module Admin
|
|||
end
|
||||
|
||||
def vote
|
||||
@ratings = @event.votes.includes(:user)
|
||||
@votes = @event.votes.includes(:user)
|
||||
|
||||
if (votes = current_user.votes.find_by_event_id(params[:id]))
|
||||
votes.update_attributes(rating: params[:rating])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue