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 --- .../plugins/paperclip/generators/paperclip/USAGE | 5 ---- .../generators/paperclip/paperclip_generator.rb | 27 ---------------------- .../paperclip/templates/paperclip_migration.rb.erb | 19 --------------- 3 files changed, 51 deletions(-) delete mode 100644 vendor/plugins/paperclip/generators/paperclip/USAGE delete mode 100644 vendor/plugins/paperclip/generators/paperclip/paperclip_generator.rb delete mode 100644 vendor/plugins/paperclip/generators/paperclip/templates/paperclip_migration.rb.erb (limited to 'vendor/plugins/paperclip/generators') diff --git a/vendor/plugins/paperclip/generators/paperclip/USAGE b/vendor/plugins/paperclip/generators/paperclip/USAGE deleted file mode 100644 index 2d611d7d..00000000 --- a/vendor/plugins/paperclip/generators/paperclip/USAGE +++ /dev/null @@ -1,5 +0,0 @@ -Usage: - - script/generate paperclip Class attachment1 (attachment2 ...) - -This will create a migration that will add the proper columns to your class's table. \ No newline at end of file diff --git a/vendor/plugins/paperclip/generators/paperclip/paperclip_generator.rb b/vendor/plugins/paperclip/generators/paperclip/paperclip_generator.rb deleted file mode 100644 index 77ee5a21..00000000 --- a/vendor/plugins/paperclip/generators/paperclip/paperclip_generator.rb +++ /dev/null @@ -1,27 +0,0 @@ -class PaperclipGenerator < Rails::Generator::NamedBase - attr_accessor :attachments, :migration_name - - def initialize(args, options = {}) - super - @class_name, @attachments = args[0], args[1..-1] - end - - def manifest - file_name = generate_file_name - @migration_name = file_name.camelize - record do |m| - m.migration_template "paperclip_migration.rb.erb", - File.join('db', 'migrate'), - :migration_file_name => file_name - end - end - - private - - def generate_file_name - names = attachments.map{|a| a.underscore } - names = names[0..-2] + ["and", names[-1]] if names.length > 1 - "add_attachments_#{names.join("_")}_to_#{@class_name.underscore}" - end - -end diff --git a/vendor/plugins/paperclip/generators/paperclip/templates/paperclip_migration.rb.erb b/vendor/plugins/paperclip/generators/paperclip/templates/paperclip_migration.rb.erb deleted file mode 100644 index eebb0e50..00000000 --- a/vendor/plugins/paperclip/generators/paperclip/templates/paperclip_migration.rb.erb +++ /dev/null @@ -1,19 +0,0 @@ -class <%= migration_name %> < ActiveRecord::Migration - def self.up -<% attachments.each do |attachment| -%> - add_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_file_name, :string - add_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_content_type, :string - add_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_file_size, :integer - add_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_updated_at, :datetime -<% end -%> - end - - def self.down -<% attachments.each do |attachment| -%> - remove_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_file_name - remove_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_content_type - remove_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_file_size - remove_column :<%= class_name.underscore.camelize.tableize %>, :<%= attachment %>_updated_at -<% end -%> - end -end -- cgit v1.3