app/controllers/phcscriptcdnpro/script/extensions_controller.rb in phcscriptcdnpro-28.0.0 vs app/controllers/phcscriptcdnpro/script/extensions_controller.rb in phcscriptcdnpro-29.0.0

- old
+ new

@@ -2,12 +2,11 @@ module Phcscriptcdnpro class Script::ExtensionsController < ApplicationController # Security & Action Filters - before_action :require_user - before_action :authrocket_membership_info + before_action :authenticate_user! before_action :set_paper_trail_whodunnit before_action :set_script_extension, only: [:show, :edit, :update, :destroy] # INDEX - Script Extension def index @@ -21,35 +20,33 @@ end # NEW - Script Extension def new @script_extension = Script::Extension.new + @script_extension.user_id = current_user.id + @script_extension.org_id = current_user.org_id end # EDIT - Script Extension def edit end # CREATE - Script Extension def create @script_extension = Script::Extension.new(script_extension_params) @script_extension.user_id = current_user.id - @script_extension.user_name = current_user.username - @script_extension.membership_id = authrocket_membership_info.id - @script_extension.oganization_id = authrocket_membership_info.org_id + @script_extension.org_id = current_user.org_id if @script_extension.save redirect_to script_extensions_url, notice: 'Extension was successfully created.' else render :new end end # PATCH/PUT - Script Extension def update @script_extension.user_id = current_user.id - @script_extension.user_name = current_user.username - @script_extension.membership_id = authrocket_membership_info.id - @script_extension.oganization_id = authrocket_membership_info.org_id + @script_extension.org_id = current_user.org_id if @script_extension.update(script_extension_params) redirect_to script_extensions_url, notice: 'Extension was successfully updated.' else render :edit end