Class: Admin::AttachmentsController
- Inherits:
-
AdminController
- Object
- AdminController
- Admin::AttachmentsController
- Defined in:
- app/controllers/admin/attachments_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/admin/attachments_controller.rb', line 7 def create @attachment = Attachment.create( .merge(user: current_user) ) return unless @attachment.valid? respond_to do |format| format.json do (@attachment) end end end |
#update ⇒ Object
20 21 22 23 24 25 |
# File 'app/controllers/admin/attachments_controller.rb', line 20 def update @attachment.update() respond_to do |format| format.json { (@attachment) } end end |