app/controllers/phcscriptcdnpro/script/licences_controller.rb in phcscriptcdnpro-8.0.2 vs app/controllers/phcscriptcdnpro/script/licences_controller.rb in phcscriptcdnpro-8.0.3

- old
+ new

@@ -5,30 +5,30 @@ # Filters & Security before_action :require_user before_action :membership_info before_action :set_script_licence, only: [:show, :edit, :update, :destroy] - + # INDEX - Script Licences def index @script_licences = Script::Licence.all end - + # DETAILS - Script Licences def show @script_licences = Script::Licence.friendly.find(params[:id]) end - + # NEW - Script Licences def new @script_licence = Script::Licence.new end - + # EDIT - Script Licences def edit end - + # POST - Script Licences def create @script_licence = Script::Licence.new(script_licence_params) @script_licence.user_id = current_user.id @script_licence.user_name = current_user.username @@ -38,11 +38,11 @@ redirect_to script_licences_url, notice: 'Licence was successfully created.' else render :new end end - + # PATCH/PUT - Script Licences def update @script_licence.user_id = current_user.id @script_licence.user_name = current_user.username @script_licence.membership_id = membership_info.id @@ -51,26 +51,26 @@ redirect_to script_licences_url, notice: 'Licence was successfully updated.' else render :edit end end - + # DELETE - Script Licences def destroy @script_licence.destroy redirect_to script_licences_url, notice: 'Licence was successfully destroyed.' end - + private - + # Common Callbacks def set_script_licence @script_licence = Script::Licence.friendly.find(params[:id]) end - + # Whitelists def script_licence_params params.require(:script_licence).permit(:lcncname, :lcncdescription, :lcncdescript, :lcnccomgpl, :lcncarvlfsf, :lcncarvlosi, :lcncarvlcopyfree, :lcncarvldebian, :lcncarvlfedora, :user_id, :slug, :user_name, :membership_id, :oganization_id) end - + end -end \ No newline at end of file +end