app/controllers/phcmembers/member/profiles_controller.rb in phcmembers-62.1.0 vs app/controllers/phcmembers/member/profiles_controller.rb in phcmembers-63.0.0
- old
+ new
@@ -10,11 +10,11 @@
before_action :set_member_profile, only: [:show, :edit, :update, :destroy]
layout "phcmembers/member_profile", :only => [ :show ]
# INDEX - Member Profile
def index
- @member_profiles = Member::Profile.where(org_id: current_user.org_id)
+ @member_profiles = Member::Profile.all
end
# DETAILED PROFILE - Member Profile
def show
@member_profile = Member::Profile.find(params[:id])
@@ -32,11 +32,10 @@
# POST - Member Profile
def create
@member_profile = Member::Profile.new(member_profile_params)
@member_profile.user_id = current_user.id
- @member_profile.org_id = current_user.org_id
if @member_profile.save
redirect_to member_profiles_url, notice: 'Profile was successfully created.'
else
render :new
end
@@ -64,10 +63,10 @@
@member_profile = Member::Profile.find(params[:id])
end
# Whitelist
def member_profile_params
- params.require(:member_profile).permit(:member_firstname, :member_lastname, :member_title, :member_email, :member_phone, :member_notes, :slug, :user_id, :org_id)
+ params.require(:member_profile).permit(:member_first_name, :member_last_name, :member_title, :member_email, :member_phone, :member_notes, :slug, :user_id)
end
end
end