Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 76d45d5

Browse files
author
ewilhelm
committed
r988@mjolnir: ewilhelm | 2006-02-19 17:03:32 -0800
app/models/participant.rb - note possible sql injection git-svn-id: http://svn.pdxruby.org/repos/www/trunk@204 f0fbaf97-c700-0410-a5eb-8ea856f8537e
1 parent 17c7548 commit 76d45d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/models/participant.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def is_attending?
2121
end
2222

2323
def self.find_upcoming(member_id)
24+
# XXX elw: find_all [statement, member_id] or else quote member_id ?
25+
# http://manuals.rubyonrails.com/read/chapter/43
2426
return self.find_by_sql("SELECT * FROM events e, participants p " +
2527
"WHERE p.event_id=e.id AND p.member_id=#{member_id} AND e.starts_at>current_date")
2628
end

0 commit comments

Comments
 (0)