Changeset 9126
- Timestamp:
- 03/28/08 22:14:04 (2 months ago)
- Files:
-
- trunk/actionpack/lib/action_view/helpers/active_record_helper.rb (modified) (2 diffs)
- trunk/activerecord/lib/active_record/migration.rb (modified) (1 diff)
- trunk/railties/lib/tasks/databases.rake (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/lib/action_view/helpers/active_record_helper.rb
r8968 r9126 204 204 alias_method :tag_without_error_wrapping, :tag 205 205 def tag(name, options) 206 if object.respond_to?("errors") && object.errors.respond_to?("on") 207 error_wrapping(tag_without_error_wrapping(name, options), object.errors.on(@method_name)) 206 if object.respond_to?("errors") && object.errors.respond_to?("on") && object.errors.on(@method_name) 207 # error_wrapping(tag_without_error_wrapping(name, options), object.errors.on(@method_name)) 208 tag_without_error_wrapping(name, options.merge({ "class" => options["class"] ? "#{options["class"]} errors" : 'errors' })) 208 209 else 209 210 tag_without_error_wrapping(name, options) … … 213 214 alias_method :content_tag_without_error_wrapping, :content_tag 214 215 def content_tag(name, value, options) 215 if object.respond_to?("errors") && object.errors.respond_to?("on") 216 error_wrapping(content_tag_without_error_wrapping(name, value, options), object.errors.on(@method_name)) 216 if object.respond_to?("errors") && object.errors.respond_to?("on") && object.errors.on(@method_name) 217 # error_wrapping(content_tag_without_error_wrapping(name, value, options), object.errors.on(@method_name)) 218 content_tag_without_error_wrapping(name, value, options.merge({ "class" => options["class"] ? "#{options["class"]} errors" : 'errors' })) 217 219 else 218 220 content_tag_without_error_wrapping(name, value, options) trunk/activerecord/lib/active_record/migration.rb
r9122 r9126 344 344 345 345 def run(direction, migrations_path, target_version) 346 self.new(direction, migrations_path, target_version) 346 self.new(direction, migrations_path, target_version).run 347 347 end 348 348 trunk/railties/lib/tasks/databases.rake
r9122 r9126 105 105 raise "VERSION is required" unless version 106 106 ActiveRecord::Migrator.run(:up, "db/migrate/", version) 107 Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby 107 108 end 108 109 … … 112 113 raise "VERSION is required" unless version 113 114 ActiveRecord::Migrator.run(:down, "db/migrate/", version) 115 Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby 114 116 end 115 117 end … … 119 121 step = ENV['STEP'] ? ENV['STEP'].to_i : 1 120 122 ActiveRecord::Migrator.rollback('db/migrate/', step) 123 Rake::Task["db:schema:dump"].invoke if ActiveRecord::Base.schema_format == :ruby 121 124 end 122 125