Class: Octodmin::Controllers::Posts::Manage

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/posts/manage.rb

Direct Known Subclasses

Destroy, Restore, Revert, Show, Upload

Instance Method Summary collapse

Instance Method Details

#call(params) ⇒ Object



3
4
5
6
7
# File 'app/controllers/posts/manage.rb', line 3

def call(params)
  self.format = :json
  @post = Octodmin::Post.find(params[:id])
  halt 400, JSON.dump(errors: ["Could not find post"]) unless @post
end