Skip to content

Instantly share code, notes, and snippets.

@iHiD
Created June 10, 2012 14:30
Show Gist options
  • Save iHiD/2905924 to your computer and use it in GitHub Desktop.
Save iHiD/2905924 to your computer and use it in GitHub Desktop.
Security Article Part 2 - 8
class ProjectsController < ApplicationController
def index
@projects = Project.where(
"user_id = #{current_user.id} AND name LIKE '#{params[:name]}%'"
)
#...
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment