From alois-commits-return-139-apmail-incubator-alois-commits-archive=incubator.apache.org@incubator.apache.org Wed Feb 02 11:47:57 2011 Return-Path: Delivered-To: apmail-incubator-alois-commits-archive@minotaur.apache.org Received: (qmail 10910 invoked from network); 2 Feb 2011 11:47:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Feb 2011 11:47:57 -0000 Received: (qmail 73956 invoked by uid 500); 2 Feb 2011 11:47:57 -0000 Delivered-To: apmail-incubator-alois-commits-archive@incubator.apache.org Received: (qmail 73942 invoked by uid 500); 2 Feb 2011 11:47:56 -0000 Mailing-List: contact alois-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: alois-dev@incubator.apache.org Delivered-To: mailing list alois-commits@incubator.apache.org Received: (qmail 73935 invoked by uid 99); 2 Feb 2011 11:47:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 11:47:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Feb 2011 11:47:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1302A2388900; Wed, 2 Feb 2011 11:47:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1066427 - /incubator/alois/trunk/rails/app/controllers/survey_controller.rb Date: Wed, 02 Feb 2011 11:47:36 -0000 To: alois-commits@incubator.apache.org From: flavio@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110202114736.1302A2388900@eris.apache.org> Author: flavio Date: Wed Feb 2 11:47:35 2011 New Revision: 1066427 URL: http://svn.apache.org/viewvc?rev=1066427&view=rev Log: Fixed name collision problem with Filter class Modified: incubator/alois/trunk/rails/app/controllers/survey_controller.rb Modified: incubator/alois/trunk/rails/app/controllers/survey_controller.rb URL: http://svn.apache.org/viewvc/incubator/alois/trunk/rails/app/controllers/survey_controller.rb?rev=1066427&r1=1066426&r2=1066427&view=diff ============================================================================== --- incubator/alois/trunk/rails/app/controllers/survey_controller.rb (original) +++ incubator/alois/trunk/rails/app/controllers/survey_controller.rb Wed Feb 2 11:47:35 2011 @@ -18,6 +18,11 @@ class SurveyController < ApplicationCont before_filter :handle_cancel, :only => [ :create, :update ] before_filter :init + def filter_class + # otherwise rails filter class would be returned + View.instance_eval("Filter") + end + def init initialize_parameters end @@ -276,7 +281,7 @@ class SurveyController < ApplicationCont def add_filter if params[:survey] and params[:survey][:filter_id] - @filters << Filter.find(params[:survey][:filter_id]) + @filters << filter_class.find(params[:survey][:filter_id]) @filters = @filters.uniq save_session end @@ -284,7 +289,7 @@ class SurveyController < ApplicationCont end def remove_filter - @filters.delete(Filter.find(params[:filter_id].to_i)) + @filters.delete(filter_class.find(params[:filter_id].to_i)) @filters = @filters.uniq save_session render :partial => "edit_named_filters"