Sergio,

How about an enhancement to this syntax ?
Lets define the syntax to be one of them - say MySQL - don't really care which, but if the adaptor is not that particular syntax the search code will rewrite the query to the right syntax. I have MySQL in Dev and host on Heroku which uses PostGreSQL - so this is a real pain.

>> ActiveRecord::Base.connection.class
=> ActiveRecord::ConnectionAdapters::PostgreSQLAdapter

For the Concat operation:
Oracle uses '|', postgres uses '||' and MySQL & SQL server uses '+'.

/S

On 3/18/2010 12:02 PM, Soren Christensen wrote:

There needs to be some documentation for the
    config.actions.swap :search, :live_search

Which is required to get the live search to work

Shall I just add it to the Wiki ?

/S


On 3/18/2010 9:51 AM, Soren Christensen wrote:
Hi,

I have a lot of various associated tables - but the search seems to be broken in them - did the config for search change ?

I have:

    # Add search to the user column
config.columns[:user].search_sql = "CONCAT(users.first_name, ' ', users.last_name)" config.columns[:user].sort_by :sql => "CONCAT(users.first_name, ' ', users.last_name)"

Where user is a belongs_to column in my database.

Did I miss something ?
The log shows that what I search for is being search for in the database, but ONLY in the native columns.

/S



--
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to