Displaying 3 results from an estimated 3 matches for "find_all_by_whatever".
2008 Jan 04
0
Records not in search results until I recreate record index
...s three properties
title - a straight db field,
open_for_search - a method which returns yes or no
site_search - which is a list of codes based on a has_many relationship
so our api accepts a title and a list of sites
creates object A with
object = Object.new
object.title = thetitle
sites = Site.find_all_by_whatever([whatever])
object.save
object.sites << sites
Then because sites were added after the object was created we do
object.ferret_create
If we do Object.find_by_contents(''title:thetitle AND
site_search:sitecode'') we get nothing
If we do Object.find_by_contents(''ti...
2005 Mar 05
1
RE: Best practice to manage ''id'' hacking? - can Rails help?
> Have you tried it to make sure it actually works?
Yep, it works.
> What I would do in your situation is to modify the show action
> on those controllers so that they don''t take the id from the URL>
> but from the session. That way somebody accessing "/account/show"
> or "/transaction/show" can only see their own details, and nobody
2006 Mar 12
3
Newbie: using find like a sql join query
I have a working Rails app with several related tables, but can''t find
an answer to this question in the Dave Thomas Rails book. Imagine for
example:
table departments with columns: id, department_name
table employees with columns: id, department_id, employee_name
and of course the employees table has a constraint foreign key
(department_id) references departments(id)
So this is