2010/9/16 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>:
> Probably, there are only two lines which quote and they are on column
> initialization, so setting search_sql you override them. You can try a find in
> script/console to guess whether active record add the quotes. You can try
> quoting the search_sql string too.
>
> xxxx.search_sql = "`db_2`.`items`.`Id_Cliente`"
Yes, I've already tryed it, but no luck. I need to change it in model
definition:
def self.table_name() "db-2.items" end
If not, has_many/has_one/belongs_to relationship doesn't wor at all.
I have also to set it in search_sql.
I have also to change it in ":confitions" when I need to add a
condition in a has_many/has_one relationship.
I have also to change it in controller's conditions_for_collection (if
I need it):
def conditions_for_collection
# Just entries with Flag_Tipo_Acceso = 'K'.
["db-2.items.Flag_Tipo_Acceso = 'K'"]
end
Finally, when I do the hack (adding ` to "fix" the problem) I get
something working but breaks other thinks. There is no solution.
And also, I think it also depends on activerecord version and
active_scaffold version, so honestly I consider there is no solution
for now.
--
Iñaki Baz Castillo
<[email protected]>
--
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.