summaryrefslogtreecommitdiff
path: root/app/controllers/nodes_controller.rb
diff options
context:
space:
mode:
authorerdgeist <erdgeist@erdgeist.org>2026-06-26 01:59:57 +0200
committererdgeist <erdgeist@erdgeist.org>2026-06-26 01:59:57 +0200
commitc06723ee715512c2033c7786c48f15674585b56b (patch)
tree46d074bde9a4fc61f0a76cbc601007ed4412ec61 /app/controllers/nodes_controller.rb
parent0818a3057b0a91e422158d828026c941b4e10622 (diff)
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
Diffstat (limited to 'app/controllers/nodes_controller.rb')
-rw-r--r--app/controllers/nodes_controller.rb6
1 files changed, 3 insertions, 3 deletions
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
36 @node.slug = params[:title].parameterize.to_s 36 @node.slug = params[:title].parameterize.to_s
37 37
38 if @node.save 38 if @node.save
39 @node.draft.update_attributes(:title => params[:title]) 39 @node.draft.update(:title => params[:title])
40 case params[:kind] 40 case params[:kind]
41 when "update" 41 when "update"
42 @node.draft.tag_list.add("update") 42 @node.draft.tag_list.add("update")
@@ -70,10 +70,10 @@ class NodesController < ApplicationController
70 end 70 end
71 71
72 def update 72 def update
73 @node.update_attributes(node_params) 73 @node.update(node_params)
74 @draft = @node.find_or_create_draft current_user 74 @draft = @node.find_or_create_draft current_user
75 @draft.tag_list = params[:tag_list] 75 @draft.tag_list = params[:tag_list]
76 if @draft.update_attributes( page_params ) 76 if @draft.update( page_params )
77 flash[:notice] = "Draft has been saved: #{Time.now}" 77 flash[:notice] = "Draft has been saved: #{Time.now}"
78 respond_to do |format| 78 respond_to do |format|
79 format.html { redirect_to edit_node_path(@node) } 79 format.html { redirect_to edit_node_path(@node) }