Sha256: 4dd8a47adb6e1b52283979fe5fc267d55aae0ea1207ca0a7c79545cc1ab692f3
Contents?: true
Size: 517 Bytes
Versions: 2
Compression:
Stored size: 517 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery before_action :set_draftsman_whodunnit def create Trashable.new(name: 'Bob').draft_creation head :no_content end def update trashable = Trashable.last trashable.name = 'Sam' trashable.draft_update head :no_content end def destroy Trashable.last.draft_destruction head :no_content end private def draftsman_enabled_for_controller request.user_agent != 'Disable User-Agent' end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
draftsman-0.5.1 | spec/dummy/app/controllers/application_controller.rb |
draftsman-0.5.0 | spec/dummy/app/controllers/application_controller.rb |