]> source.dussan.org Git - sonarqube.git/commitdiff
Nasty Hack to make active record ignore two columns in user system table
authorDavid Gageot <david@gageot.net>
Fri, 6 Jul 2012 09:06:34 +0000 (11:06 +0200)
committerDavid Gageot <david@gageot.net>
Fri, 6 Jul 2012 09:06:39 +0000 (11:06 +0200)
We need to find a better solution.

sonar-server/src/main/webapp/WEB-INF/vendor/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/jdbc/adapter.rb

index f1e68f4d551b756e5e023fa8617e5b79e68acd9a..ac44408fef4d7154a9f5e24f2fc275eda004c445 100644 (file)
@@ -224,6 +224,8 @@ module ActiveRecord
       end
 
       def jdbc_columns(table_name, name = nil)
+        # sonar
+        return @connection.columns(table_name.to_s).reject { |c| (c.name=='admin' || c.name=='remarks') } if table_name=='users'
         @connection.columns(table_name.to_s)
       end
       alias_chained_method :columns, :query_cache, :jdbc_columns