diff --git a/app/models/plan.rb b/app/models/plan.rb index 0a7de28..04738a1 100644 --- a/app/models/plan.rb +++ b/app/models/plan.rb @@ -27,7 +27,7 @@ :exported_plans, :project, :title, :template, :grant_number, :identifier, :principal_investigator, :principal_investigator_identifier, :description, :data_contact, :funder_name, :visibility, :exported_plans, - :roles, :users, :as => [:default, :admin] + :roles, :users, :org, :as => [:default, :admin] accepts_nested_attributes_for :roles # public is a Ruby keyword so using publicly diff --git a/app/models/user.rb b/app/models/user.rb index 6ad36e1..91355df 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -41,11 +41,13 @@ # Possibly needed for active_admin # -relies on protected_attributes gem as syntax depricated in rails 4.2 accepts_nested_attributes_for :roles - attr_accessible :password_confirmation, :encrypted_password, :remember_me, :id, :email, - :firstname, :last_login,:login_count, :orcid_id, :password, :shibboleth_id, - :user_status_id, :surname, :user_type_id, :org_id, :skip_invitation, - :other_organisation, :accept_terms, :role_ids, :dmponline3, :api_token, - :organisation, :language, :language_id, :org, :perms, :confirmed_at + attr_accessible :password_confirmation, :encrypted_password, :remember_me, + :id, :email, :firstname, :last_login,:login_count, :orcid_id, + :password, :shibboleth_id, :user_status_id, :surname, + :user_type_id, :org_id, :skip_invitation, :other_organisation, + :accept_terms, :role_ids, :dmponline3, :api_token, + :organisation, :language, :language_id, :org, :perms, + :confirmed_at, :org_id validates :email, email: true, allow_nil: true, uniqueness: true