app/controllers/phcmemberspro/member/profiles_controller.rb in phcmemberspro-88.0.0 vs app/controllers/phcmemberspro/member/profiles_controller.rb in phcmemberspro-89.0.0

- old
+ new

@@ -10,11 +10,11 @@ before_action :set_member_profile, only: [:show, :edit, :update, :destroy] layout "phcmemberspro/member_profile", :only => [ :show ] # INDEX def index - @member_profiles = Member::Profile.all + @member_profiles = Member::Profile.where(org_id: current_user.org_id) end # SHOW def show @member_profile = Member::Profile.find(params[:id]) @@ -32,9 +32,10 @@ # CREATE 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, :flash => { :success => 'Profile was successfully created.' } else render :new end