From e0a7e0fec760ba12c8067a37e10c96f1f05876e2 Mon Sep 17 00:00:00 2001 From: erdgeist Date: Wed, 24 Jun 2026 04:13:16 +0200 Subject: Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgrade - Converted plugins to gems (Gemfile) - Updated config structure (application.rb, boot.rb, environment.rb) - Converted routes to Rails 3 DSL - Converted named_scope to scope throughout models - Converted find(:all, :conditions) to where() chains - Fixed has_many :order to use ordering scope - Updated session store and secret token configuration - Fixed exception_notification middleware configuration - Patched Ruby 2.4 / Rails 3.2 incompatibilities: - Integer/Float duration arithmetic (ActiveSupport) - Arel visit_Integer for PostgreSQL adapter - create_database String/Integer coercion - ActionController consider_all_requests_local - Migrated taggings schema for acts-as-taggable-on - Replaced dynamic_form gem with custom form_error_messages helper - Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for) - Fixed admin layout yield - Updated test suite for Rails 3 APIs --- app/views/nodes/edit.html.erb | 10 +++++++--- app/views/nodes/index.html.erb | 2 +- app/views/nodes/new.html.erb | 9 ++++++--- 3 files changed, 14 insertions(+), 7 deletions(-) (limited to 'app/views/nodes') diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 612a3d3c..d40d4e75 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb @@ -7,8 +7,12 @@ <% end %>
-<% form_for(@node) do |f| %> - <%= f.error_messages %> +<%= form_for(@node) do |f| %> + <% if @node.errors.any? %> +
+
    <% @node.errors.full_messages.each do |msg| %>
  • <%= msg %>
  • <% end %>
+
+ <% end %>
Event
@@ -35,7 +39,7 @@ %>
- <% fields_for @draft do |d| %> + <%= fields_for @draft do |d| %>
Tags - comma seperated
<%= text_field_tag :tag_list, @draft.tag_list %>
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index bf016459..e5a55d41 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb @@ -27,7 +27,7 @@ <%= node.lock_owner.login if node.lock_owner %> - <%= node.draft ? node.draft.revision : node.head.revision %> + <%= node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY") %> <% end %> diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index 7d744de7..028d7270 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb @@ -1,11 +1,14 @@

Create new node

-<%= error_messages_for( :node ).gsub("Slug", "Title") %> - +<% if @node.errors.any? %> +
+
    <% @node.errors.full_messages.each do |msg| %>
  • <%= msg.to_s.gsub("Slug", "Title") %>
  • <% end %>
+
+<% end %>

What kind of node do you want to create?

-<% form_tag nodes_path do %> +<%= form_tag nodes_path do %> -- cgit v1.3
Type