Pascal Friederich
2007-Sep-13 11:22 UTC
Override "created_at"-like Methods and add new one''s
Hi, i''am about to redevelop an existing application and iam not allowed to touch the structure of the database. Every table of the database has the following fields: anl_dat (<- created_at) anl_user (<- who created the entry) aend_dat (<- updated_at) aend_user (<- who updated) how can i override the default rails behaviour so it uses the anl_dat instead of created_at? and is there a way to tell rails to automaticly fill anl_user with something like session[:user_name] ? I need this for 99% of my models, only 2 tables need special treatment... Thanks in advance, Pascal --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---