Skip to content

Instantly share code, notes, and snippets.

View mperrando's full-sized avatar

Marco Perrando mperrando

View GitHub Profile
@mperrando
mperrando / monkey_patch_pull_4370.rb
Created May 2, 2013 15:43
Quick&drty monkey patch to fix the https://github.com/rails/rails/issues/4321 issue in the 3.2 branch.
# https://github.com/rails/rails/issues/4321
#
# https://github.com/rails/rails/pull/4370/files
#
raise "delete me" if ActiveModel::VERSION::MAJOR >= 4
module ActiveRecord
module Validations
class UniquenessValidator < ActiveModel::EachValidator
require 'rack/body_proxy'
class Lograge2
def initialize(app)
@app = app
end
def call(env)
Thread.current['lograge.data'] = {}
status, header, body = @app.call(env)
diff --git a/modules/field/views_handler_field_field.inc b/modules/field/views_handler_field_field.inc
index e30a1e8..1fc4309 100644
--- a/modules/field/views_handler_field_field.inc
+++ b/modules/field/views_handler_field_field.inc
@@ -394,6 +394,9 @@ class views_handler_field_field extends views_handler_field {
$options['separator'] = array(
'default' => ', '
);
+ $options['separator_last_override'] = array(
+ 'default' => NULL