index method

Ruby code posted by LOO
created at 09 Jul 15:42

Edit | Back
1
2
3
4
5
6
7
  def index
    @posts = Post.published
    respond_to do |format|
      format.html # index.html.erb
      format.xml  { render :xml => @posts }
    end
  end
165 Bytes in 8 ms with coderay