Class: Admin::AttachmentsController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- PagesCore::BaseController
- ApplicationController
- PagesCore::AdminController
- AdminController
- Admin::AttachmentsController
- Defined in:
- app/controllers/admin/attachments_controller.rb
Instance Attribute Summary
Attributes included from PagesCore::Authentication
Instance Method Summary collapse
Methods inherited from PagesCore::AdminController
Methods included from PagesCore::StaticCacheController
Methods included from PagesCore::PoliciesHelper
#policy, #verify_policy, #verify_policy_with_proc
Methods included from PagesCore::ProcessTitler
inc_number_of_requests, original_title
Methods included from PagesCore::ErrorRenderer
Methods included from PagesCore::Authentication
#authenticate!, #deauthenticate!, #logged_in?
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 |