Sha256: 04e372439aa330d3647ac665d89ed0580e8295cbbb815cb8d6e5b86c020ed9f0
Contents?: true
Size: 588 Bytes
Versions: 1
Compression:
Stored size: 588 Bytes
Contents
class PostsController < ApplicationController resource :post do search :title modify :title, :body end # GET /posts def index respond_with posts end # GET /posts/1 def show respond_with post end # GET /posts/new def new render :new end # GET /posts/1/edit def edit render :edit end # POST /posts def create post.save respond_with post end # PATCH/PUT /posts/1 def update post.update(edit_params) respond_with post end # DELETE /posts/1 def destroy post.destroy respond_with post end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
controller_resources-0.0.6 | spec/dummy/app/controllers/posts_controller.rb |