Skip to content

Commit

Permalink
fixing error in match model
Browse files Browse the repository at this point in the history
  • Loading branch information
Eladio Ruiz committed Nov 15, 2010
1 parent baef8e3 commit 473f46d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/match.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Match < ActiveRecord::Base
named_scope :my_matches_android,
lambda { |userID,ordering,limits,course|
{
:select => "matches.id as match_id, courses.name as course_name, date_format(matches.date_hour_match,'%d/%m/%Y %H:%i') as date_hour ",
:select => "distinct matches.id as match_id, courses.name as course_name, date_format(matches.date_hour_match,'%d/%m/%Y %H:%i') as date_hour ",
:joins => "inner join players on matches.id=players.match_id inner join users on players.user_id=users.id inner join courses on matches.course_id=courses.id ",
:conditions => !!course.blank? ? ["users.id=?",userID] : ["users.id=? and course_id=?",userID,course] ,
:order => ordering,
Expand Down

0 comments on commit 473f46d

Please sign in to comment.