Sha256: 153fe963b100ccb2c3031a63499b6048bc2667c4cd2868f27b8507bfe72d79c7
Contents?: true
Size: 380 Bytes
Versions: 3
Compression:
Stored size: 380 Bytes
Contents
module Spontaneous::Rack::Back class Changes < Base before do forbidden! unless user.level.can_publish? end get '/?' do json(Spontaneous::Change) end post '/?' do ids = params[:page_ids] halt 400 if ids.blank? || ids.empty? pages = ids.map(&:to_i) Spontaneous::Site.publish_pages(pages) json({}) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
spontaneous-0.2.0.beta4 | lib/spontaneous/rack/back/changes.rb |
spontaneous-0.2.0.beta3 | lib/spontaneous/rack/back/changes.rb |
spontaneous-0.2.0.beta2 | lib/spontaneous/rack/back/changes.rb |