cfp team users should have access to event commercials only

This commit is contained in:
Nishanth Vijayan 2016-08-16 18:56:54 +05:30
parent e2659ae907
commit a02060b665
2 changed files with 6 additions and 2 deletions

View file

@ -86,7 +86,9 @@ module Admin
@comment_count = @event.comment_threads.count
@ratings = @event.votes.includes(:user)
@difficulty_levels = @program.difficulty_levels
@versions = @event.versions | PaperTrail::Version.where(item_type: 'Commercial', item_id: @event.commercials.pluck(:id))
@versions = @event.versions |
PaperTrail::Version.where(item_type: 'Commercial').where_object(commercialable_id: @event.id, commercialable_type: 'Event') |
PaperTrail::Version.where(item_type: 'Commercial').where_object_changes(commercialable_id: @event.id, commercialable_type: 'Event')
end
def edit