fix index: attachment json and proposal find
This commit is contained in:
parent
7022e5da1d
commit
a86b81e3c0
1 changed files with 2 additions and 2 deletions
|
|
@ -3,12 +3,12 @@ class EventAttachmentsController < ApplicationController
|
|||
skip_before_filter :verify_user, :only => [:show]
|
||||
|
||||
def index
|
||||
@proposal = current_user.person.events.find(params[:proposal_id])
|
||||
@proposal = Event.find(params[:proposal_id])
|
||||
@uploads = @proposal.event_attachments
|
||||
|
||||
respond_to do |format|
|
||||
format.html # index.html.erb
|
||||
format.json { render json: @uploads.map{|upload| upload.to_jq_upload } }
|
||||
format.json { render json: {files: @uploads.map{|upload| upload.to_jq_upload } }}
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue