Displaying 2 results from an estimated 2 matches for "update_histori".
Did you mean:
update_history
2006 Apr 06
7
LoginSystem : make @session available to models
Hello.
LoginSystem is cool, it populates the @session instance variable of
controllers with many useful info.
The fact is : it would be cool to let models know about the session,
too.
For instance, after_update and after_create callbacks could store *who*
did *what* on *what.
Aim : having ActiveRecord::Base::session defined, returning the @session
of the controller which manipulates the
2010 Mar 31
1
How to assign currently logged in user name to a table field
I have 3 tables
items (columns are: id, name , type)
history(columns are: id, date, username, item_id, user_id)
user(id , username, password)
When a user "ABC" logs in and creates a new item, a history record gets
created with the following after_create filter.
How to set the username field in history table to "ABC".
class Item < ActiveRecord::Base
has_many :histories