Events: removendo campo date
This commit is contained in:
@@ -113,8 +113,8 @@ class UsersController < ApplicationController
|
||||
unless @current_user.courses.empty?
|
||||
@news = News.find(:all, :conditions => [ 'receiver_id in (?)', @current_user.courses ],
|
||||
:order => 'timestamp desc', :limit => 5)
|
||||
@events = Event.find(:all, :conditions => [ 'course_id in (?) and (date > ?) and (date < ?)',
|
||||
@current_user.courses, 1.day.ago, 21.days.from_now ], :order => 'date')
|
||||
@events = Event.find(:all, :conditions => [ 'course_id in (?) and (time > ?) and (time < ?)',
|
||||
@current_user.courses, 1.day.ago, 21.days.from_now ], :order => 'time')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class Course < ActiveRecord::Base
|
||||
:foreign_key => "receiver_id",
|
||||
:order => 'id desc'
|
||||
|
||||
has_many :events, :order => "date asc, time asc"
|
||||
has_many :events, :order => "time asc"
|
||||
|
||||
has_many :log_entries, :order => "created_at desc"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user