Sha256: a6d63870c6f51862dee4eaaadc25515716958fc2f5529c14db67a99acb7c60e6
Contents?: true
Size: 494 Bytes
Versions: 8
Compression:
Stored size: 494 Bytes
Contents
class WidgetsController < ApplicationController def paper_trail_enabled_for_controller request.user_agent != "Disable User-Agent" end def create @widget = Widget.create widget_params head :ok end def update @widget = Widget.find params[:id] @widget.update_attributes widget_params head :ok end def destroy @widget = Widget.find params[:id] @widget.destroy head :ok end private def widget_params params[:widget].permit! end end
Version data entries
8 entries across 8 versions & 2 rubygems