app/controllers/phcmemberspro/members/contacts_controller.rb in phcmemberspro-2.2.3 vs app/controllers/phcmemberspro/members/contacts_controller.rb in phcmemberspro-2.2.4
- old
+ new
@@ -10,11 +10,11 @@
# Add Member Contact Information
before_action :phc_member_mains_info
def phc_member_mains_info
- @main = Members::Main.find(params[:main_id])
+ @members_main = Members::Main.find(params[:main_id])
end
# Member Contact Index
def index
main = Members::Main.find(params[:main_id])
@@ -54,20 +54,20 @@
end
end
# Update Action
def update
- if @members_contact.scoped_to(current_account).update(members_contact_params)
+ if @members_contact.update(members_contact_params)
redirect_to members_main_contacts_path, notice: 'Member contact information was successfully updated.'
else
render :edit
end
end
# Delete Action
def destroy
@main = Members::Main.find(params[:main_id])
- @members_contact = @main.contacts.scoped_to(current_account).find(params[:id])
+ @members_contact = @main.find(params[:id])
@members_contact.destroy
redirect_to members_main_contacts_path, notice: 'Member contact information was successfully destroyed.'
end
private