krasnoukhov/octodmin

View on GitHub
app/controllers/posts/manage.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Octodmin::Controllers::Posts
  class Manage
    def call(params)
      self.format = :json
      @post = Octodmin::Post.find(params[:id])
      halt 400, JSON.dump(errors: ["Could not find post"]) unless @post
    end
  end
end