Sha256: 8501fa31ab13aaede7583e726ac965c06c233f98a6838de10b9a25a43804c036
Contents?: true
Size: 530 Bytes
Versions: 1
Compression:
Stored size: 530 Bytes
Contents
class BlocksController < BaseController include Restful::Base respond_to :html restful model: :document def create create! do |success, failure| success.html { redirect_to root_path } end end def update update! do |success, failure| success.html { redirect_to root_path } failure.html { render :new } end end protected def create_secure_params params.require(:document).permit :name end def update_secure_params params.require(:document).permit :name end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
restful_controller-0.2.0 | test/dummy/app/controllers/blocks_controller.rb |