Robert Pankowecki
Not a member
Robert Pankowecki's latest activity
Monday, July 19 2010
5125
collection_singular_ids= method raises an exception when primary_key is strin...
was updated
in Ruby on Rails
-
Robert Pankowecki commented at 6:24 PMBut I have one question before: How should the method behave when the given list of ids constains unexisting id? Raise an exception or just ignore it silently?
-
Robert Pankowecki commented at 6:22 PMI just found that my patch brokes the method when primary_key is a number. I'm goinh to post soon a better version.
Friday, July 16 2010
5132
Merging two relations (ActiveRecord::Relation) created with joins() method do...
was created
in Ruby on Rails
-
Robert Pankowecki created the ticket at 9:38 AMclass Containment < ActiveRecord::Base belongs_to :child, :class_name => 'Unit' end Containment.joins(:child => :properties) works fine but Containment.joi...
5131
Preloading associations generates invalid sql for STI and has_many :through w...
was created
in Ruby on Rails
-
Robert Pankowecki created the ticket at 7:14 AMclass Role < ActiveRecord::Base has_many :user_roles has_many :users, :through => :user_roles end class User < BusinessObject # STI has_many :user_roles...
Thursday, July 15 2010
5125
collection_singular_ids= method raises an exception when primary_key is strin...
was updated
in Ruby on Rails
-
Robert Pankowecki commented at 9:26 PMCould not reproduce your statement about Arel
ruby-1.9.2-head > Role.primary_key => "name" ruby-1.9.2-head > role = Role.arel_table ruby-1.9.2-head > role.w... -
-
-
Robert Pankowecki created the ticket at 5:53 PMUsing collection_singular_ids= (method generated by has_many) raises an exception when class primary_key is string.
Example:
class Role < ActiveRecord::Base ...
5117
validates_uniqueness_of fails when primary key value changed
was created
in Ruby on Rails
-
Robert Pankowecki created the ticket at 10:27 AMclass Role set_primary_key :short_name validates_uniqueness_of :name end test "validates_uniqueness_of" do r = Role.new(:name => "name" ) r.short_name...