search for: robitzki

Displaying 6 results from an estimated 6 matches for "robitzki".

2006 May 17
6
ActiveRecord#to_param
Hello, to implement some some kind of optimistic locking, I want to build a view, where an object is displayed together with a link containing the data of the displayed object. My first try looked something like <%= object.object_discription %> <%= link_to "action", :action => "take_action", :data => object %> this won''t work because object is of
2006 May 27
2
ActiveRecord::Base::find_for_create_modify
Hi, for some models I found that it''s easier to share the controller new and update code just to share the view code. At the front of every such action function I have to lookup if the object already exists, if so "find" it from the database and update the "attributes=". If there is no such object, "new" it with the attributes I''ve got from the
2006 Jul 04
1
How to override ActiveRecord#base#destroy
Hello, I have a database table with a primary key not being a simple id but three columns. By overriding update() and create() I got Rails to work with that table quit good. Except for the destroy() action. From the resulting trace I can see that the old version of destroy() is called from transaction.rb. I think this lines might be the reason that I''m unable to override detroy():
2006 Jun 27
3
Weird ActiveRecord Foreign Key Problem
Hello to all, I ran into a weird problem with an ActivRecord. I have a table named "build_order" with a column named "type" that is a foreign key to a table called "building_type". In a controller I try to read all the build_orders with "BuildOrder.find :all" and get the following error and stack trace: (eval):1:in `instance_eval'': compile
2006 Jul 30
0
after_validation_on_update double invokes
Hello to all, I want to use the after_validation_on_update call back to keep some redundancy in sync with the model. But now I''ve encountered that the call-back get called two times. Is this the intended behaviour? What can I do to prevent Rails from doing so? best regards Torsten
2006 May 30
1
Not working validation
Hi there, I have some model classes where I''ve tested successful that validation worked. After some more days of iterations I found that that validation isn''t working anymore. The validation functions are not even called. Example: class Company < ActiveRecord::Base validates_uniqueness_of :name validates_numericality_of :money validates_each :money do |record, attr,