Displaying 1 result from an estimated 1 matches for "logedin".
Did you mean:
loggedin
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