File: posts_controller.rb

package info (click to toggle)
ruby-rabl 0.17.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,280 kB
  • sloc: ruby: 6,732; javascript: 102; makefile: 6
file content (11 lines) | stat: -rw-r--r-- 196 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
class PostsController < ApplicationController
  respond_to :json, :xml, :html

  def index
    @posts = Post.all(:order => "id ASC")
  end

  def show
    @post = Post.find(params[:id])
  end
end