From c06723ee715512c2033c7786c48f15674585b56b Mon Sep 17 00:00:00 2001 From: erdgeist Date: Fri, 26 Jun 2026 01:59:57 +0200 Subject: Stage 4: Rails 5.2 -> 6.1 on Ruby 2.7.2 - routing-filter 0.6.3 -> 0.7.0 (Rails 6.1 compatibility) - RSS named routes rss_xml/rss_rdf added - RouteWithParams workarounds: will_paginate_patch, content_path shim, safe_path helper - Paperclip removed, replaced with FileAttachment concern (preserves URL scheme) - Assets resource moved to /admin/assets (Sprockets middleware conflict) - ApplicationRecord base class added, all models migrated - Strong parameters added to Assets, Occurrences, Events, MenuItems controllers - update_attributes -> update throughout - render :nothing -> head :ok/:not_found throughout - language_selector rewritten (removes :overwrite_params) - Environment files updated for Rails 6.1 (eager_load, public_file_server, ActionMailer) - Arel::Visitors::DepthFirst and Integer/Float duration patches removed from test_helper - AssetsController tests added (10 tests covering upload, variants, destroy, auth) - ImageMagick geometry: 460x250! for headline crop (not # which is invalid in IM6) 129 runs, 311 assertions, 5 failures (all pre-existing), 0 errors --- app/controllers/nodes_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/controllers/nodes_controller.rb') diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index 482d0ac..bd60b27 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb @@ -36,7 +36,7 @@ class NodesController < ApplicationController @node.slug = params[:title].parameterize.to_s if @node.save - @node.draft.update_attributes(:title => params[:title]) + @node.draft.update(:title => params[:title]) case params[:kind] when "update" @node.draft.tag_list.add("update") @@ -70,10 +70,10 @@ class NodesController < ApplicationController end def update - @node.update_attributes(node_params) + @node.update(node_params) @draft = @node.find_or_create_draft current_user @draft.tag_list = params[:tag_list] - if @draft.update_attributes( page_params ) + if @draft.update( page_params ) flash[:notice] = "Draft has been saved: #{Time.now}" respond_to do |format| format.html { redirect_to edit_node_path(@node) } -- cgit v1.3