foreman_users 0.0.19 → 0.0.20
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,10 +1,10 @@
|
|
1
1
|
require "fileutils"
|
2
2
|
class ForemanUsers::User < ActiveRecord::Base
|
3
3
|
|
4
|
-
attr_accessible :title, :body, :username, :ensure , :gid, :groups, :home , :password, :password_max_age, :password_min_age, :shell, :uid, :
|
4
|
+
attr_accessible :title, :body, :username, :ensure , :gid, :groups, :home , :password, :password_max_age, :password_min_age, :shell, :uid, :foreman_users_groups_attributes
|
5
5
|
|
6
6
|
|
7
|
-
has_many :foreman_users_groups, class_name: "ForemanUsers::Group", :
|
7
|
+
has_many :foreman_users_groups, class_name: "ForemanUsers::Group", foreign_key: "user_id"
|
8
8
|
accepts_nested_attributes_for :foreman_users_groups, reject_if: proc { |attributes| attributes['gid'].blank?| attributes['groupname'].blank? | attributes['ensure'].blank? } , allow_destroy: true
|
9
9
|
|
10
10
|
after_create :create_dir
|