GitHub Sale: sign up for any paid plan this week and pay nothing until January 1, 2009!  [ hide ]

public
Description: my own written blog software
Homepage: http://blog.digitalcodes.org
Clone URL: git://github.com/anildigital/anil-blog.git
Fixed ambiguous query
anildigital (author)
Sat Mar 22 23:08:40 -0700 2008
commit  d06b26811486b43dccc1c87a33e6566ae3a04c01
tree    6be60997d6323f94e6b63949a86dfb8f94a67563
parent  968e3c8543e13b3c4181b188663399ff9249abdc
...
4
5
6
7
 
8
9
10
 
11
12
13
14
15
 
16
17
18
...
4
5
6
 
7
8
9
 
10
11
12
13
14
 
15
16
17
18
0
@@ -4,15 +4,15 @@ class ArticlesController < ApplicationController
0
  
0
   # shows list of articles in the articles table
0
   def index
0
- @all_articles = Article.find(:all, :select => "post_title, permalink, created_at",
0
+ @all_articles = Article.find(:all, :select => "articles.post_title, articles.permalink, articles.created_at",
0
                                  :order => "created_at DESC")
0
     @articles = Article.find(:all, :include => ["comments"],
0
- :order => "created_at DESC")
0
+ :order => "articles.created_at DESC")
0
   end
0
 
0
   # Generates instance variables necessary show article.
0
   def show
0
- @all_articles = Article.find(:all, :select => "post_title, permalink, created_at", :order => "created_at DESC")
0
+ @all_articles = Article.find(:all, :select => "articles.post_title, articles.permalink, articles.created_at", :order => "articles.created_at DESC")
0
     params[:permalink] = params[:id]
0
     if params[:permalink]
0
       @article = Article.find_by_permalink(params[:permalink])

Comments

    No one has commented yet.