Permalink
Browse files

Queries must now be select statements

  • Loading branch information...
1 parent 2bd0a16 commit f4264e1303460a851bf0791de56ba08b5d02e110 Oliver Searle-Barnes committed Mar 22, 2010
Showing with 1 addition and 0 deletions.
  1. +1 −0 app/models/report.rb
View
@@ -1,4 +1,5 @@
class Report < ActiveRecord::Base
attr_accessible :name, :query, :database_id
belongs_to :database
+ validates_format_of :query, :with => /^select.*/, :message => 'must be a select statement'
end

0 comments on commit f4264e1

Please sign in to comment.