nesquena/rabl

View on GitHub
fixtures/padrino_test/app/controllers/posts.rb

Summary

Maintainability
A
20 mins
Test Coverage
PadrinoTest.controllers :posts do
  get :index do
    @posts = Post.order("id ASC")
    render "posts/index"
  end

  get :show, :map => "/posts", :with => :id do
    @post = Post.find(params[:id])
    render "posts/show"
  end
end