similar to: Don''t log params

Displaying 20 results from an estimated 3000 matches similar to: "Don''t log params"

2006 Mar 16
4
Handling/Catching Exceptions
Hello! I was wondering, sometimes I raise an exception in my Rails apps, e.g.: raise SecurityError unless @post.user == logged_in_user Now: is there any way to catch that SecurityError exception somewhere and render a custom template? E.g., I want to render ''app/views/content/security_error.rhtml'' Does anyone know how to do this? Thanks a bunch, Rob
2006 Apr 01
4
Custom Validations
Does anyone how to create a validation that: validates_presence_of :a OR :b I.e. :a OR :b must be present. I thought this would probably be possible with some kind of validation callback, e.g.: def check_a_or_b_is_set return (a or b) end Any ideas? Thanks, Rob -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 May 21
3
Sending mail times out (ActionMailer)
Hi! I''m on debian. Sending a mail from Rails times out: Timeout::Error (execution expired): /usr/local/lib/ruby/1.8/timeout.rb:54:in `new'' /usr/local/lib/ruby/1.8/net/protocol.rb:206:in `old_open'' /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout'' /usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout''
2006 Apr 01
2
Textile headaches
I have the newest version of RedCloth installed (3.0.4). I want the following output: <h1>Header</h1> <p>Some text</p> This is what I tried but no luck: irb(main):002:0> require ''rubygems'' => true irb(main):004:0> require_gem ''RedCloth'' => true irb(main):006:0> RedCloth.new("h1. Header\r\nSome Text").to_html
2006 Apr 14
2
Markaby trunk broken?
Hello! Does anyone know how I can check out the Markaby trunk? I''m getting this error: <code> ruby script/plugin install http://code.whytheluckystiff.net/svn/markaby/trunk + ./trunk/svnindex.xsl /usr/local/lib/ruby/1.8/open-uri.rb:290:in `open_http'': 404 Not Found (OpenURI::HTTPError) from /usr/local/lib/ruby/1.8/open-uri.rb:629:in `buffer_open''
2006 May 26
4
shouldn''t this work? - session[:array_of_objects].delete_if {|x| x.id == params[:id]}
I am saving an array of active record objects (college courses) in the session as session[:course_list]. This is the cart for a registration controller. If a student chooses to delete the course from the list I get the :id as params[:id]. However if I do session[:course_list].delete_if {|x| x.id ==params[:id]} does not work. session[:course_list].delete_at(idx) works. Ocourse to do this I have
2006 Jun 06
14
How can I set the session in a functional test?
Hey :) I need to simulate a login in my functional test, otherwise I can''t GET nor POST to the action. I need to set the session key "logged_in_user_id". I tried this inside the setup() method: session[''logged_in_user_id''] = 1 But that throws: TypeError: can''t convert String into Integer Any ideas? Thanks, Rob -------------- next part
2005 Nov 23
2
Really supress output from Sweave
Hi, I am using Sweave for chapters in my thesis that contain results. In the beginning of each chapter, I use this to load libraries I need. <<init,echo=FALSE,quiet=TRUE>>= library(gplots) library(Hmisc) library(e1071) @ What I want is, of course, to supress messages written by this code, but what I get in the end is X-init.tex with this the contents below. How do I really supress
2006 Mar 13
6
JobsOnRails
Announcing... JobsOnRails! I''m creating on a Ruby on Rails oriented job site and will be launching in the next few weeks. It''s a Rails-centric place for developers and employers to get in touch with a minimum of hassle. For now, I have a short outline of my ideas and an email signup form on the live site at http://www.jobsonrails.com. The site is coming along nicely and
2006 Aug 08
12
delete_if doesn''t work for has_and_belongs_to_many
I''m using Rails-1.1.4 with Ruby-1.8.4 So let''s say I have 2 model classes: class Item has_and_belongs_to_many :things end class Thing has_and_belongs_to_many :items end i = Item.new i.things << Thing.new( :value => "Something").save i.things << Thing.new( :value => "Something Else" ).save i.save Fine, now I have two records in the
2004 Jun 02
1
Fax Recognizion without Answer? How to Supress this?
Hello, we have a PRI (E1) to a carrier and a second one to a legacy PBX: DTAG ---pri---- * ------ Hicmo (PSTN) | | Sip and more Many normal inbound calls are direcly routed to the hicom. Outbound calls from the Hicom go through LCR and then to PSTN. Inbound faxes are working, but outbound faxes from hicom to pstn are
2006 May 23
6
How to list all models of an application?!?
How can I get a list of all model classes in the domain of a Rails application (all models, both in "app/models" and in components/somedir/model.rb)? Thanx in advance for your precious help! Edoardo "Dado" Marcora
2006 Apr 22
4
How to supress field name in error message?
Hi How do I supress the reporting of a field name in the full error message? I want the error to be associated with the field so that the .fieldWithErrors class is applied to the field but I don''t want it to add the field name to the actual error message. For example: errors.add("occurs_on", "The date can''t be today!") unless occurs_on != Date.today I
2009 Feb 04
2
delete_if does not work on associations
I tried to user delete_if on an association: class Group < ActiveRecord::Base has_many :memberships, :dependent => :destroy has_many :users, :through => :memberships ... end This is the controller method, trying to use delete_if. Although some elements are removed (s2 < s1), the save method does not update the association. def intersect_or_remove_group other_group =
2018 Aug 21
3
ess 17.11-3 won't install on Ubuntu 16.04
On Mon, Aug 20, 2018 at 10:43:52AM -0500, Dirk Eddelbuettel wrote: > > On 20 August 2018 at 15:29, Eva Myers wrote: > | Hello, > | Attempting to install ess (17.11-3xenial0) on our Ubuntu 16.04 systems > | is failing with an error message. > > This can happen. I (with my Debian hat on) had to make 17.11-3 because the > ess package did not behave with Debian untable and
2007 Sep 09
1
filter_parameter_logging
Hi, Is there a way to specify keys of a hash in params to filter_parameter_logging. For example, my payment form sends creditcard[:number] and creditcard[:type] in params and I filter these keys using filter_parameter_logging :number, :type. I don''t want :number and :type in other forms to be filtered. Is there a way to solve this? thanks, Ritesh
2006 Feb 22
4
heatmap.2 in gplots package
Hello all, I am using the heatmap.2 function in the gplots package. I want to supress the reordering of the columns of the data matrix i pass to the function. I used the statement, heatmap.2(z,Colv=FALSE,dendrogram="row",col=redgreen(75)) where z, is the matrix of data. The output i want should have the rows reordered along with the dendrogram and the columns should be in the original
2006 Sep 25
2
@article.article_groups.delete_if... Dosn't work!
If I try: @article.article_groups.delete_if {|x| x.group_id == x.group_id } It does nothing. If I try: articletmp.article_groups.each{ |x| @article.article_groups.delete(y) } It deletes some of the groups. @article.article_groups.clear works. Why dosn''t the to first examples work as expected?? Do I have to put groups I don''t want to
2004 Jul 15
3
Important note for AGI with PHP newbies
I say this note is important only because I (a AGI PHP newbie) was tormented by this problem for many an hour, even though I'm sure it's documented somewhere or obvious to more experienced users. So as I was experimenting with AGI in PHP scripting I was baffled by why Asterisk was properly receiving AGI commands written to stdout but always returning "510 invalid command" to the
2008 Jul 29
2
About clustering techniques
Hello R users It's some time I am playing with a dataset to do some cluster analysis. The data set consists of 14 columns being geographical coordinates and monthly temperatures in annual files latitutde - longitude - temperature 1 -..... - temperature 12 I have some missing values in some cases, maybe there are 8 monthly valid values at some points with four non valid. I don't want to