find-by-sql Questions

6

Is there a way to sanitize sql in rails method find_by_sql? I've tried this solution: Ruby on Rails: How to sanitize a string for SQL when not using find? But it fails at Model.execute_sql("Upda...
Barbital asked 22/8, 2011 at 9:49

3

Solved

In my Rails application I want to use the will_paginate gem to paginate on my SQL query. Is that possible? I tried doing something like this but it didn't work: @users = User.find_by_sql(" SELECT...
Robbery asked 29/3, 2010 at 4:56

1

Solved

good day guys! I'm using find_by_sql() in rails 3 to fetch records as follows. @list=Email.find_by_sql(["SELECT * FROM Emails WHERE sent_id=?",params[:id]]) How to modify the same statement if ...
Frontiersman asked 11/6, 2012 at 9:5
1

© 2022 - 2024 — McMap. All rights reserved.