Sha256: 6c6b38c6bcf2d2e1315485162d85ab0fee02a1daeb534827a74b5a6cc54a589c
Contents?: true
Size: 626 Bytes
Versions: 15
Compression:
Stored size: 626 Bytes
Contents
require_dependency "landable/api_controller" module Landable module Api class TemplateRevisionsController < ApiController def index template = Template.find(params[:template_id]) respond_with template.revisions.order(:ordinal).reverse end def show revision = TemplateRevision.find(params[:id]) respond_to do |format| format.json { respond_with revision } end end def revert_to revision = TemplateRevision.find(params[:id]) revision.template.revert_to! revision respond_with revision end end end end
Version data entries
15 entries across 15 versions & 1 rubygems