search for: extendingactiverecordexampl

Displaying 4 results from an estimated 4 matches for "extendingactiverecordexampl".

2006 Mar 04
1
Saving current date/time upon comment submission - help!
I''m having trouble storing the date/time with my comments - I''m getting the MySQL error "posted_at is null". How do I setup my code to automatically store the current date/time in the ''posted_at'' column of my ''comments'' table? -- Posted via http://www.ruby-forum.com/.
2006 Feb 28
1
Cache Magic field for totaling
Hello, Rails provide counter cache field for associations, I want a similar cache for totaling up values (say account_balance = sum_of_deposits - sum_of_withdrawals). I was wondering if rails, already has another surprise in store for me, or is there any plug-in or how-to for doing these kind of things. Thanks. -- Surendra Singhi http://ssinghi.kreeti.com, http://www.kreeti.com Read the
2006 Jan 20
11
Userstamp Plugin
...//www.delynnberry.com/articles/category/userstamp/) and post a comment on any of the posts. Credits and Special Thanks -------------------------- The original idea for this plugin came from the Rails Wiki article entitled "Extending ActiveRecord" ( http://wiki.rubyonrails.com/rails/pages/ExtendingActiveRecordExample ). Special Thanks to Ben Reubenstein (benr75@gmail.com) for helping me stress test this plugin. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060120/f2548f72/attachment-0001.html
2006 May 15
8
set_table_name and self.table_name
I have some legacy tables that I used set_table_name on, I''m attempting to write a method that will get key value from a sequence table and then update it and return a value. I''m hoping to put this in the base ActiveRecord method so I would like to reference the table name with self.table_name or something... class Contacts < ActiveRecord::Base set_table_name