Sha256: bf9546bae8223db42192bc57d572497cdbc79c9753d7b2b97030dea1d942ee25
Contents?: true
Size: 302 Bytes
Versions: 3
Compression:
Stored size: 302 Bytes
Contents
module Octodmin::Controllers::Posts class Revert include Octodmin::Action expose :post def call(params) self.format = :json @post = Octodmin::Post.find(params[:id]) halt 400, JSON.dump(errors: ["Could not find post"]) unless @post @post.revert end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
octodmin-0.2.1 | app/controllers/posts/revert.rb |
octodmin-0.2.0 | app/controllers/posts/revert.rb |
octodmin-0.1.0 | app/controllers/posts/revert.rb |