diff options
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb | 2 | ||||
-rwxr-xr-x | railties/fresh_rakefile | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 5e1a2e66ce..e8b7d7810a 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -113,7 +113,7 @@ module ActionView text.gsub!(/\n\n/, '</p>\0<p>') # turn two newlines into paragraph text.gsub!(/([^\n])(\n)([^\n])/, '\1\2<br />\3') # turn single newline into <br /> - return '<p>' + text + '</p>' # wrap the first and last line in paragraphs before we're done + content_tag("p", text) end # Turns all urls and email addresses into clickable links. The +link+ parameter can limit what should be linked. diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index 0ce5f39421..1863a9be57 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -66,7 +66,7 @@ module ActiveRecord return nil if value.nil? || value =~ /^\s*null\s*$/i case type when :string then value - when :integer then value == true || value == false ? value == true ? '1' : '0' : value.to_i + when :integer then value == true || value == false ? value == true ? 1 : 0 : value.to_i when :float then value.to_f when :datetime then cast_to_datetime(value) when :timestamp then cast_to_time(value) diff --git a/railties/fresh_rakefile b/railties/fresh_rakefile index ac17c75546..44d16b820e 100755 --- a/railties/fresh_rakefile +++ b/railties/fresh_rakefile @@ -189,5 +189,5 @@ end desc "Migrate the database according to the migrate scripts in db/migrate (only supported on PG/MySQL). A specific version can be targetted with VERSION=x" task :migrate => :environment do - ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/db/migrate/', ENV["VERSION"]) + ActiveRecord::Migrator.migrate(File.dirname(__FILE__) + '/db/migrate/', ENV["VERSION"] ? ENV["VERSION"].to_i : nil) end
\ No newline at end of file |