Sha256: 5c8844a23f1154b7209122aed1c742d00a1019985d6a631036fbaf31f8c23a05

Contents?: true

Size: 318 Bytes

Versions: 77

Compression:

Stored size: 318 Bytes

Contents

class PostsController < ApplicationController
  def index
    @posts = Post.all(:order => "id ASC")
    respond_to do |format|
      format.json { render "posts/index" }
    end
  end

  def show
    @post = Post.find(params[:id])
    respond_to do |format|
      format.json { render "posts/show" }
    end
  end
end

Version data entries

77 entries across 77 versions & 2 rubygems

Version Path
rabl-0.10.0 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.4.pre1 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.3 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.3.pre1 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.2 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.1 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.0 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.0.pre4 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.0.pre3 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.0.pre2 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.9.0.pre fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.8.6 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.8.5 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.8.4 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.8.3 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.8.2 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.8.1 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.8.0 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.7.10 fixtures/rails2/app/controllers/posts_controller.rb
rabl-0.7.9 fixtures/rails2/app/controllers/posts_controller.rb