Method: Cms::AttachmentsController#create
- Defined in:
- app/controllers/cms/attachments_controller.rb
#create ⇒ Object
28 29 30 31 32 33 34 35 36 37 |
# File 'app/controllers/cms/attachments_controller.rb', line 28 def create @attachment = Attachment.new(params[:attachment]) @attachment.published = true if @attachment.save render :partial => 'cms/attachments/attachment_wrapper', :locals => {:attachment => @attachment} else #TODO: render html error string render :inline => 'an error ocurred' end end |