diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
| commit | e0a7e0fec760ba12c8067a37e10c96f1f05876e2 (patch) | |
| tree | d0cf745592a46aee4d4913911fd34c7c24515220 /app/views/nodes | |
| parent | 6424e10be5a89f175a74c71c55660412a169b8b8 (diff) | |
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
Diffstat (limited to 'app/views/nodes')
| -rw-r--r-- | app/views/nodes/edit.html.erb | 10 | ||||
| -rw-r--r-- | app/views/nodes/index.html.erb | 2 | ||||
| -rw-r--r-- | app/views/nodes/new.html.erb | 9 |
3 files changed, 14 insertions, 7 deletions
diff --git a/app/views/nodes/edit.html.erb b/app/views/nodes/edit.html.erb index 612a3d3..d40d4e7 100644 --- a/app/views/nodes/edit.html.erb +++ b/app/views/nodes/edit.html.erb | |||
| @@ -7,8 +7,12 @@ | |||
| 7 | <% end %> | 7 | <% end %> |
| 8 | 8 | ||
| 9 | <div id="page_editor"> | 9 | <div id="page_editor"> |
| 10 | <% form_for(@node) do |f| %> | 10 | <%= form_for(@node) do |f| %> |
| 11 | <%= f.error_messages %> | 11 | <% if @node.errors.any? %> |
| 12 | <div class="error_messages"> | ||
| 13 | <ul><% @node.errors.full_messages.each do |msg| %><li><%= msg %></li><% end %></ul> | ||
| 14 | </div> | ||
| 15 | <% end %> | ||
| 12 | 16 | ||
| 13 | <div id="metadata"> | 17 | <div id="metadata"> |
| 14 | <div class="node_description">Event</div> | 18 | <div class="node_description">Event</div> |
| @@ -35,7 +39,7 @@ | |||
| 35 | %> | 39 | %> |
| 36 | </div> | 40 | </div> |
| 37 | 41 | ||
| 38 | <% fields_for @draft do |d| %> | 42 | <%= fields_for @draft do |d| %> |
| 39 | <div class="node_description">Tags - comma seperated</div> | 43 | <div class="node_description">Tags - comma seperated</div> |
| 40 | <div class="node_content"><%= text_field_tag :tag_list, @draft.tag_list %></div> | 44 | <div class="node_content"><%= text_field_tag :tag_list, @draft.tag_list %></div> |
| 41 | 45 | ||
diff --git a/app/views/nodes/index.html.erb b/app/views/nodes/index.html.erb index bf01645..e5a55d4 100644 --- a/app/views/nodes/index.html.erb +++ b/app/views/nodes/index.html.erb | |||
| @@ -27,7 +27,7 @@ | |||
| 27 | <%= node.lock_owner.login if node.lock_owner %> | 27 | <%= node.lock_owner.login if node.lock_owner %> |
| 28 | </td> | 28 | </td> |
| 29 | <td> | 29 | <td> |
| 30 | <%= node.draft ? node.draft.revision : node.head.revision %> | 30 | <%= node.draft ? node.draft.revision : (node.head ? node.head.revision : "EMPTY") %> |
| 31 | </td> | 31 | </td> |
| 32 | </tr> | 32 | </tr> |
| 33 | <% end %> | 33 | <% end %> |
diff --git a/app/views/nodes/new.html.erb b/app/views/nodes/new.html.erb index 7d744de..028d727 100644 --- a/app/views/nodes/new.html.erb +++ b/app/views/nodes/new.html.erb | |||
| @@ -1,11 +1,14 @@ | |||
| 1 | <h1>Create new node</h1> | 1 | <h1>Create new node</h1> |
| 2 | 2 | ||
| 3 | <%= error_messages_for( :node ).gsub("Slug", "Title") %> | 3 | <% if @node.errors.any? %> |
| 4 | 4 | <div class="error_messages"> | |
| 5 | <ul><% @node.errors.full_messages.each do |msg| %><li><%= msg.to_s.gsub("Slug", "Title") %></li><% end %></ul> | ||
| 6 | </div> | ||
| 7 | <% end %> | ||
| 5 | 8 | ||
| 6 | <p>What kind of node do you want to create?</p> | 9 | <p>What kind of node do you want to create?</p> |
| 7 | 10 | ||
| 8 | <% form_tag nodes_path do %> | 11 | <%= form_tag nodes_path do %> |
| 9 | <table id="new_node"> | 12 | <table id="new_node"> |
| 10 | <tr> | 13 | <tr> |
| 11 | <td class="description">Type</td> | 14 | <td class="description">Type</td> |
