I'm using rails-2.2 from 2 weeks ago, but not updated it, since i have to fix some couple things in the code that affect postgresql interaction, like :datetime is created as timestamp, but timestamp es read back by ActiveSupport as :timewithzone and have to create aliases for this. I see you fixed, thanks!
On Mar 13, 7:04 am, "Sergio Cambra .:: entreCables - Symbol Servicios Informáticos S.L. ::." <[email protected]> wrote: > El Thursday 12 March 2009 18:56:30 naaano escribió: > > > > > Acording to SQL ISO standard, boolean types are "CRUDed" as: > > TRUE - FALSE > > However, Mysql doesn't have real support for boolean types, instead > > using a patched way of tinyint. > > Not surprising that most users use this database engine, the code > > developed to interact with databases is first made with Mysql in > > mind. > > So, AS doesn't have problems with this since most of it is handled via > > ActiveRecord, but there's some harcoded SQL in it. Particulary, this > > mistakes reflect on 2 parts/files: > > > 1.- the search_ui (search_column_helpers.rb: line > > 106:active_scaffold_search_boolean) > > 2.- the finder constructor (finder.rb: condition_for_column, line 39) > > > However, Mysql supports SQL ISO standard for this, so, switching the > > code to SQL standard makes it work for all database engines: > > > in search_column_helpers.rb, lines 109 and 110: > > select_options << [as_(:true), true] > > select_options << [as_(:false), false] > > I have fixed it, thanks. > > > > > in finder.rb, line 39: > > ["#{column.search_sql} = ?", value.to_s] > > In rails-2.2 and master branches is: > ["#{column.search_sql} = ?", column.column.type_cast(value)] > I think it should be work for postgresql > What rails and AS version are you using? > > -- > Sergio Cambra .:: entreCables S.L. ::. > Nicolás Guillén 6, locales 2 y 3. 50.018 Zaragoza > T) 902 021 404 F) 976 52 98 07 E) [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 -~----------~----~----~----~------~----~------~--~---
