function constant(who)
local smt = function(who)
local mtt = {
__index = function(t,k)
return who[k]
end,
__newindex = function(t,k,v)
if(who[k] == nil) then
who[k] = v;
end
e
要表示组可以有多个用户,并且用户可以属于多个组,我设置以下关联: class Group < ActiveRecord::Base
has_many :users_groups
has_many :users, :through => :users_groups
end
class User < ActiveRecord::Base
has_many :users_groups