Commit Graph

7265 Commits

Author SHA1 Message Date
Pratik Naik
cd994eff9a Allow conditions on multiple tables to be specified using hash.
Examples:

  User.all :joins => :items, :conditions => { :age => 10, :items => { :color => 'black' } }
  Item.first :conditions => { :items => { :color => 'red' } }

Note : Hash key in :conditions is referring to the actual table name or the alias defined in query.
2008-06-28 01:27:51 +01:00
Jeremy Kemper
582bff71c4 Fix typo in apparently-dead will_unload? method. 2008-06-27 17:21:57 -07:00
Pratik Naik
76e00fc784 Ensure observer test inherits from ActiveSupport::TestCase 2008-06-27 18:18:39 +01:00
Pat George
4ddca325ee Warn and uses singularized ModelName if a plural ModelName is given to script/generate. Override with --force-plural. [#333 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-27 16:35:26 +01:00
Cheah Chu Yeow
3c1e8ab0fe Allow single quote (the ' character) in the middle of URL when auto_link-ing. [#471 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-27 13:46:17 +01:00
Jeremy Kemper
4498aad4ac MySQL: treat integer with :limit => 11 as a display width, not byte size, for backward-compatibility. 2008-06-27 01:07:22 -07:00
Jan De Poorter
b2b761166d Make sure associated has_many/habtm objects get saved even when :validate => false is used. [#486 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-27 03:02:13 +01:00
Pratik Naik
5ca7d01eca Cache sanitized conditions in reflection object for associations 2008-06-27 02:47:38 +01:00
Andre Arko
0b12da44aa Extract owner_quoted_id so it can be overridden. [#292 state:committed] 2008-06-25 19:04:09 -07:00
Bob Klosinski
a93ea88c06 Added Thin support to script/server. [#488 state:resolved] 2008-06-25 18:56:52 -07:00
Jeremy Kemper
24c7f41b4f Freeze ModelName cache_key also 2008-06-25 18:55:55 -07:00
Jeremy Kemper
c397260577 Performance: minor Column#text? and #number? speedups 2008-06-25 18:55:55 -07:00
Joshua Peek
339491a6b3 Set precompiled fixture load path constant to speed up tests 2008-06-25 15:24:12 -05:00
Joshua Peek
a9259ccfe0 Hide InlineTemplate class from ActionController and use ActionView's render API 2008-06-25 06:04:06 -05:00
Joshua Peek
ad772402c4 Made ActionView::Base#render_file private 2008-06-25 05:57:24 -05:00
Joshua Peek
6f5327013d Consolidate CustomHandlerTest, TemplateFileTest, and TemplateObjectTest and test them at a higher level of abstraction in ViewRenderTest. 2008-06-25 05:49:38 -05:00
Jimmy Baker
670e22e372 Patched HTML::Document#initialize call to Node.parse so that it includes the strict argument. [#330] 2008-06-24 23:11:35 -07:00
Jeremy Kemper
071fe79279 Include cache key in ModelName 2008-06-24 22:07:09 -07:00
Jeremy Kemper
6874caa407 Performance: minor Array#to_param and #to_query speedups 2008-06-24 21:49:49 -07:00
Jeremy Kemper
69e72af622 Improve readability 2008-06-24 11:53:49 -07:00
Jeremy Kemper
f6520b7dc7 Test for tinyint 2008-06-23 23:42:06 -07:00
Jeremy Kemper
b409474325 link_to_function and button_to_function shouldn't modify their options hashes 2008-06-23 23:41:21 -07:00
Jeremy Kemper
290e1e2fc5 Treat any limit > 4 as bigint 2008-06-23 18:16:03 -07:00
Cheah Chu Yeow
f1cfd12487 Allow script/about to run in production mode instead of failing with a cryptic const_missing error.
[#370 state:resolved]
2008-06-23 10:27:33 -07:00
Jeremy Kemper
d7462ea365 Revert "Check for mocha gem without requiring the lib. [#403 state:resolved]"
This reverts commit 4d5ac3f3d2.
2008-06-23 00:31:49 -07:00
Jeremy Kemper
4d5ac3f3d2 Check for mocha gem without requiring the lib. [#403 state:resolved] 2008-06-22 20:52:29 -07:00
Tarmo Tänav
baddea95e1 Always treat integer :limit as byte length. [#420 state:resolved] 2008-06-22 20:42:31 -07:00
Daniel Morrison
3610997ba3 Partial updates don't update lock_version if nothing changed. [#426 state:resolved] 2008-06-22 20:33:43 -07:00
Mark Catley
0fd3e4cd2b Fix column collision with named_scope and :joins. [#46 state:resolved] 2008-06-22 19:21:15 -07:00
Tammer Saleh
bb6e8eea5a Fixed polymorphic_url to be able to handle singleton resources.
Example usage:
polymorphic_url([:admin, @user, :blog, @post]) # => admin_user_blog_post_url(@user, @post)

[#461 state:resolved]
2008-06-22 18:58:47 -07:00
Jeremy Kemper
a210f50361 Oops, already had a postgresql_version method! 2008-06-22 18:50:19 -07:00
ian
3532eaf92a Only use DROP ... IF EXISTS for PostgreSQL 8.2 or later. [#400 state:resolved] 2008-06-22 18:31:47 -07:00
Michael Raidel
f94600bdaf ActiveRecord::Migrator#run records version-state after migrating. [#369 state:resolved] 2008-06-22 18:16:17 -07:00
Tarmo Tänav
1afae84ab2 Fixed that scopes defined with a string name could not be composed 2008-06-22 17:26:00 -07:00
Jeremy Kemper
43cbcb10ae nix extra newline 2008-06-22 16:22:23 -07:00
Jeremy Kemper
a73ac98123 Changelog for 509374e 2008-06-22 16:21:08 -07:00
Tarmo Tänav
509374ebe2 Named bind variables can now be used with postgresql-style typecasts
For example :conditions => ['stringcol::integer = :var', { :var => 10 }]
will no longer raise an exception about ':integer' having a missing value.
2008-06-22 16:16:06 -07:00
Diego Algorta
2e1b56c937 MySQL: rename_column preserves default values. [#466 state:resolved] 2008-06-22 15:21:11 -07:00
Jeremy Kemper
a02d672cd7 Horo rdoc template 2008-06-22 10:38:25 -07:00
Jeremy Kemper
f4ccc17953 Performance: javascript helper tweaks to speed up escaping and reduce object allocations when building options strings 2008-06-21 14:54:10 -07:00
Jeremy Kemper
9a0e443719 Everything responds to #to_param 2008-06-21 04:19:30 -07:00
Jeremy Kemper
8d24a029df Don't assume RubyProf constants are defined 2008-06-20 10:42:36 -07:00
David Heinemeier Hansson
161ab28b7c Added block-handling to Enumerable#many? (Damian Janowski) [#452 state:resolved] 2008-06-20 11:31:06 -05:00
Jeremy Kemper
00ba4c0cf3 true#to_param => true, so be sure to #to_s expanded cache keys 2008-06-20 00:46:00 -07:00
Jeremy Kemper
879245de1c Tired of seeing <foo>/run 2008-06-20 00:36:59 -07:00
Jeremy Kemper
83c3e9903d Don't profile GC runs/time by default 2008-06-20 00:35:11 -07:00
Jeremy Kemper
f47c81ff37 Fall back to #to_s for cache key expansion 2008-06-20 00:25:41 -07:00
Jeremy Kemper
72f93b581f Check whether blocks are called from erb using a special __in_erb_template variable visible in block binding. 2008-06-19 22:21:56 -07:00
Jeremy Kemper
c440c9b199 Move erb_trim_mode setting to the ERB template handler. Keep a Base.erb_trim_mode= delegator around. 2008-06-19 17:18:07 -07:00
Pratik Naik
2e232af91f Add performance test generator 2008-06-19 20:13:45 +01:00