similar to: automatic type casting of query parameters in finds

Displaying 20 results from an estimated 30000 matches similar to: "automatic type casting of query parameters in finds"

2007 Sep 02
0
using database for validation
I''ve been playing around with the idea of using the database for model validation where possible (instead of duplicating that validation in rails). My first approach to this was to catch exceptions from save/ create and parse the errors, in my case from postgres, to turn them into something friendlier. Something like: def update create end def create begin super
2010 Sep 12
11
Rails 3: finding a record by name in multilingual app
Hello, I upgraded my application from Rails 2 to Rails 3 and ran into a problem. In rails 2 I could use the english name of the record to find it like: Page.find_by_name("Welcome") even though the user chose German as the language (which of course showed the German welcome page. Eversince I switched to Rails 3 (default_locale still :en) I can''t find anything by giving the
2006 Mar 17
3
Timestamps casted to nil?
Hi, for some reason, all timestamp fields with or without time zone in my Postgres tables seem to be casted to nil. From console: >> me = User.find(''PS12345'') => #<User:0x2379788 @attributes={"mtime"=>"01.03.2006 13:26:32.737166", "valid"=>"8", "valid_from"=>"01.03.1999 14:09:21 CET",
2010 May 12
16
In development mode not all types are included in the query related to type
class User end class Agent < User end script/console production User.find_by_name ''john'' SELECT "people".* FROM "people" WHERE ((("people"."type" = ''User'' OR "people"."type" = ''Manager'') OR "people"."type" = ''Agent'')) AND
2005 Sep 06
6
strange behavior of acts_as_taggable
I was testing my models with this new library and I got: >> s.tag "warp" ActiveRecord::StatementInvalid: ERROR: inserción o actualización en la tabla «tags_stories» viola la llave foránea «tags_stories_story_id_fkey» DETAIL: La llave (story_id)=(8) no está presente en la tabla «stories». : INSERT INTO tags_stories ("tag_id", "story_id") VALUES
2012 Jul 06
0
[LLVMdev] Exception handling slowdown?
On Jul 5, 2012, at 1:33 AM, Duncan Sands wrote: > Hi Bill, > >> Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? > > I don't see any relevant LLVM changes, so I guess clang C++ compilation slowed > down due to some clang changes. I'm not going to investigate this. > Crumbs. John, Do you know of anything that went into
2006 Jan 20
3
postgres db setup
All of the tutorials and the Agile book use MySQL and I''ve got that working. I am now trying to use PostgreSQL and can''t seem to get going. Is my problem the db setup in postgresql? I have installed postgres-pr The error message when I try to access http://localhost:3000/clients when using PostgreSQL (MySQL works fine) ActiveRecord::StatementInvalid (RuntimeError: ERROR
2012 Jun 25
0
[LLVMdev] Exception handling slowdown?
Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? -bw On Jun 20, 2012, at 12:38 AM, Duncan Sands <baldrick at free.fr> wrote: > Did something change with exception handling recently? A bunch of lit bots are > showing slower compile times for many tests. > > Ciao, Duncan. > > On 20/06/12 07:53, llvm-testresults at cs.uiuc.edu
2012 Jul 05
2
[LLVMdev] Exception handling slowdown?
Hi Bill, > Nothing that I'm aware of has changed with EH. Is it possible to bisect the problem? I don't see any relevant LLVM changes, so I guess clang C++ compilation slowed down due to some clang changes. I'm not going to investigate this. Ciao, Duncan. > > -bw > > On Jun 20, 2012, at 12:38 AM, Duncan Sands <baldrick at free.fr> wrote: > >> Did
2012 Jun 20
2
[LLVMdev] Exception handling slowdown?
Did something change with exception handling recently? A bunch of lit bots are showing slower compile times for many tests. Ciao, Duncan. On 20/06/12 07:53, llvm-testresults at cs.uiuc.edu wrote: > > lab-mini-03__O0-g__clang_DEV__x86_64 test results > <http://llvm.org/perf/db_default/v4/nts/1283?compare_to=1278&baseline=999> > > Run Order Start Time Duration >
2007 Jun 23
3
has_and_belongs_to_many and dynamic find
Hi Just curious if anyone can explain why using a dynamic find fails to work with << operator I have standard habtm relationship class User < ActiveRecord::Base has_and_belongs_to_many :roles Now when I assign a Role via << after saving the new User I get wierd behaviour but only when using the dynamic version of find i.e @user = User.new(p) if @user.save #
2011 Dec 01
1
[LLVMdev] [llvm-testresults] bwilson__llvm-gcc_PROD__i386 nightly tester results
Are these 225 compile time regressions real? It sure looks bad! Ciao, Duncan. On 01/12/11 09:39, llvm-testresults at cs.uiuc.edu wrote: > > bwilson__llvm-gcc_PROD__i386 nightly tester results > > URL http://llvm.org/perf/db_default/simple/nts/380/ > Nickname bwilson__llvm-gcc_PROD__i386:4 > Name curlew.apple.com > > Run ID Order Start Time End Time > Current 380
2006 Mar 02
3
Modifying "Find" to always add a condition?
I''d like to always add a condition to any version of "find" (e.g. Thing.find(), Thing.find_by_name(), Thing.find_by_whatever) so that in addition to whatever conditions are set, an additional condition is set :conditions=>"user_id=#{current_user.id}" I''d like to make sure that a user only sees/edits/creates entries in the database that have the user_id
2008 Jul 21
0
Re: find_by_name won't return record id
UGH. Totally dumb. My Role model had: def id end Thus, overriding the accessor. Not sure how that got there - but, problem solved. On Jul 21, 7:28 am, bubba_baloo <bubba_ba...-/E1597aS9LQAvxtiuMwx3w@public.gmane.org> wrote: > Okay - so I''m finally making my first post after a couple of months > with RoR. Thanks for all the great information so far. > > I''m
2009 Mar 11
1
How to dummy a DB adapter?
I am writing a library module to handle certain StatementInvalid type AR exceptions. I wish to catch the case where the db adapter in use is not supported by the module. I would like to test this situation and have only a vague idea as to how to proceed. My exception handling method selects the parsing method based on the adapter_name value. def hll_ar_exception(exception) raise
2015 May 18
2
[LLVMdev] Proposal: change LNT’s regression detection algorithm and how it is used to reduce false positives
Hi Chris and others! I totally support any work in this direction. In the current state LNT’s regression detection system is too noisy, which makes it almost impossible to use in some cases. If after each run a developer gets a dozen of ‘regressions’, none of which happens to be real, he/she won’t care about such reports after a while. We clearly need to filter out as much noise as we can - and
2013 Jul 31
0
[LLVMdev] [Polly] Update of Polly compile-time performance on LLVM test-suite
On 07/30/2013 10:03 AM, Star Tan wrote: > Hi Tobias and all Polly developers, > > I have re-evaluated the Polly compile-time performance using newest > LLVM/Polly source code. You can view the results on > http://188.40.87.11:8000 > <http://188.40.87.11:8000/db_default/v4/nts/16?compare_to=9&baseline=9&aggregation_fn=median>. > > Especially, I also evaluated
2006 Jan 18
1
Rails and PostgreSQL bytea
Hi! I''m trying to insert binary data into a PostgreSQL database where the field is of type ''bytea''. This works fine if a do Base64 encoding but I just want to do character escaping. How do I do this????. What I get is this: ActiveRecord::StatementInvalid in Init_test#save_file ArgumentError: Invalid Ruby/cstring: INSERT INTO
2013 Aug 02
1
[LLVMdev] [Polly] Update of Polly compile-time performance on LLVM test-suite
At 2013-08-01 23:29:14,"Tobias Grosser" <tobias at grosser.es> wrote: >On 07/31/2013 09:23 PM, Star Tan wrote: >> At 2013-07-31 22:50:57,"Tobias Grosser" <tobias at grosser.es >> <mailto:tobias at grosser.es>> wrote: >> >>>On 07/30/2013 10:03 AM, Star Tan wrote: >>>> Hi Tobias and all Polly developers,
2013 Aug 01
0
[LLVMdev] [Polly] Update of Polly compile-time performance on LLVM test-suite
On 07/31/2013 09:23 PM, Star Tan wrote: > At 2013-07-31 22:50:57,"Tobias Grosser" <tobias at grosser.es > <mailto:tobias at grosser.es>> wrote: > >>On 07/30/2013 10:03 AM, Star Tan wrote: >>> Hi Tobias and all Polly developers, >>> >>> I have re-evaluated the Polly compile-time performance using newest >>> LLVM/Polly source