search for: usesguid

Displaying 2 results from an estimated 2 matches for "usesguid".

Did you mean: use_uid
2007 Jun 16
1
extending activerecord base with after_initialize
...'t seem to be kicking in. i think i m missing a step in the self.included function, but not sure exactly what. i tried to use the AR:validation and other classes as reference, but i couldn''t get it to work. any insight into what i am doing wrong is greatly appreciated. cheers. === usesguid.rb === require ''uuidtools'' module ActiveRecord module Usesguid def self.included(base) # :nodoc: super base.extend ClassMethods end module ClassMethods def after_initialize self.id ||= UUID.timestamp_create().to_s.gsub(''-'...
2006 May 06
0
Issues using GUID plugin: IDs and acts_as_versioned
...s+Guid+Plugin). However, I''m running into a few issues: ISSUE #1) Rails'' handling of IDs as strings instead of integers. In particular, it didn''t seem to work when I had a model doing "acts_as_list" with a scope: Example: Class Big < ActiveRecord::Base usesguid has_many :littles end Class Little < ActiveRecord::Base usesguid belongs_to :big acts_as_list :scope => big_id end It seems like the generated SQL queries wouldn''t put the ID with string quotations. I get an error like: Mysql::Error: Unknown column ''ayMi4o3iyr2OYf...