public
Description: El Dorado is a full-stack community web application written in Ruby/Rails.
Homepage: http://almosteffortless.com/eldorado/
Clone URL: git://github.com/trevorturk/el-dorado.git
fixing typo in event finders

git-svn-id: http://eldorado.googlecode.com/svn/trunk@503 
9c008b19-a030-0410-9975-d76d301b4276
trevorturk (author)
Tue Oct 23 21:57:44 -0700 2007
commit  58ed74a6e910193b3fe0d759a4c52f897d885cc6
tree    c3c917b015b1954c629031d128e81de547d56f05
parent  9643d4e8a0c0c0743e92857b8069a3b00357f4ea
...
7
8
9
10
 
11
12
 
13
14
15
...
7
8
9
 
10
11
 
12
13
14
15
0
@@ -7,9 +7,9 @@ class EventsController < ApplicationController
0
   def index
0
     @date = Time.parse("#{params[:date]} || TzTime.now")
0
     if logged_in?
0
- @events = Event.find(:all, :conditions => ['created_at between ? and ?', @date.strftime("%Y-%m") + '-01', @date.next_month.strftime("%Y-%m") + '-01'])
0
+ @events = Event.find(:all, :conditions => ['date between ? and ?', @date.strftime("%Y-%m") + '-01', @date.next_month.strftime("%Y-%m") + '-01'])
0
     else
0
- @events = Event.find(:all, :conditions => ['created_at between ? and ? and private = ?', @date.strftime("%Y-%m") + '-01', @date.next_month.strftime("%Y-%m") + '-01', false])
0
+ @events = Event.find(:all, :conditions => ['date between ? and ? and private = ?', @date.strftime("%Y-%m") + '-01', @date.next_month.strftime("%Y-%m") + '-01', false])
0
     end
0
   end
0
 
...
4
5
6
7
 
8
9
10
...
4
5
6
 
7
8
9
10
0
@@ -4,7 +4,7 @@ class HomeController < ApplicationController
0
     if logged_in?
0
       @date = Time.parse("#{params[:date]} || TzTime.now")
0
       @topics = Topic.find(:all, :limit => 20, :include => [:user, :forum, :last_poster], :order => 'topics.last_post_at desc')
0
- @events = Event.paginate(:page => params[:page], :conditions => ['created_at between ? and ?', @date.strftime("%Y-%m") + '-01', @date.next_month.strftime("%Y-%m") + '-01'])
0
+ @events = Event.find(:all, :conditions => ['date between ? and ?', @date.strftime("%Y-%m") + '-01', @date.next_month.strftime("%Y-%m") + '-01'])
0
       @uploads = Upload.find(:all, :limit => 5, :include => :user, :order => 'uploads.updated_at desc')
0
       @headers = Header.find(:all, :limit => 3, :include => :user, :order => 'headers.created_at desc')
0
       @users = User.find(:all, :limit => 3, :order => 'profile_updated_at desc')

Comments

    No one has commented yet.