Emilio Tagua
eb3ae44cca
Merge commit 'rails/master'
...
Conflicts:
activerecord/lib/active_record/migration.rb
2009-08-10 10:40:11 -03:00
Emilio Tagua
9520143159
Merge commit 'rails/master'
...
Conflicts:
activerecord/test/cases/adapter_test.rb
activerecord/test/cases/method_scoping_test.rb
2009-08-08 19:14:35 -03:00
rizwanreza
5786395760
Allow content_tag options to take an array [ #1741 state:resolved] [rizwanreza, Nick Quaranto]
...
Example:
content_tag('p', "limelight", :class => ["song", "play"])
# => <p class="song play">limelight</p>
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 22:21:32 +01:00
Pratik Naik
761283ffdb
Ensure hm:t#create/create! throws ActiveRecord::RecordNotSaved when the owner is new
2009-08-08 21:51:33 +01:00
Dan Croak
00544c778f
Add test ensuring redirect_to uses the given protocol [ #2886 ]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 20:48:39 +01:00
Pratik Naik
6464d76feb
DRY migration's rollback/forward methods
2009-08-08 20:47:14 +01:00
Pratik Naik
c6fe49b009
Simplyfy validates_length_of and remove puts
2009-08-08 19:08:39 +01:00
jzw
5ab94b2595
validates_length_of with maximum should allow nil [ #2309 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 19:08:13 +01:00
José Valim
c34d6279a0
Allow radio buttons to work with booleans.
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 18:02:07 +01:00
rizwanreza
1191e3ffaf
Add :include_blank option for select_tag [ #1987 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:58:27 +01:00
Pratik Naik
ed8a0a1c23
Ensure db:drop:all doesn't error out on exception [ #2997 state:resolved] [Anthony Caliendo]
2009-08-08 17:53:51 +01:00
Cristi Balan
7f84f14efa
Add rake db:forward - opposite of db:rollback [ #768 state:resolved]
...
Example:
rake db:forward # performs the next migration
rake db:forward STEP=4 # performs the next 4 migrations
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:41:43 +01:00
Niklas Holmgren
c284412b14
Polymorphic routes generates collection URL from model class [ #1089 state:resolved]
...
Signed-off-by: Dan Pickett <dpickett@enlightsolutions.com >
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 17:00:29 +01:00
Yehuda Katz
ad98827a78
Merge commit 'jose/responder'
2009-08-08 12:54:02 -03:00
José Valim
016ed9b429
Added rubygems to generators load_paths, but we only load generators from gems that are alraedy activated. This fixes the version problem and avoid silly conflicts.
2009-08-08 17:48:07 +02:00
José Valim
469d89dd44
Rename Rails::Generators::ActionORM to Rails::Generators::ActiveModel.
2009-08-08 17:48:07 +02:00
José Valim
6e0ac748e4
Renamed ActionController::Renderer to ActionController::Responder and ActionController::MimeResponds::Responder to ActionController::MimeResponds::Collector.
2009-08-08 17:48:07 +02:00
Yehuda Katz
efcfce50c4
Fixes "Cached fragment hit" written to log even if fragment is not cached (Erik Andrejko) [ #2917 state:resolved]
2009-08-08 12:46:44 -03:00
Bas Van Klinkenberg
0fbeaa98e4
Fixed a bug in JSON decoding with Yaml backend, where a combination of dates, escaped or unicode encoded data and arrays would make the parser fail with a ParseError exception. [ #2831 state:resolved]
...
Signed-off-by: Yehuda Katz <wycats@gmail.com >
2009-08-08 12:44:41 -03:00
Yehuda Katz
d0301e13f4
First pass at making partial rendering an Object. More cleanup to come.
2009-08-08 12:44:26 -03:00
Steve St. Martin
a8645593a4
remove duplicate call to stringify_keys [ #2587 status:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 13:56:41 +02:00
Wolfram Arnold
73f2d37505
Add test to verify that the new :inverse_of association option will indeed fix the validation problem for a belongs_to relationship that validates_presence_of the parent, when both the parent and the child are new (in-memory) records. Also check that this works when the parents adds child via nested_attributes_for.
...
Lastly, add a require 'models/pet' to association_validation_test.rb, so that test can be run independently (was failing due to that missing dependency). [#2815 status:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2009-08-08 13:07:49 +02:00
Eric Davis
fbe6c3c195
Adds a :file delivery_method to save email to a file on disk
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2438 state:committed]
2009-08-08 16:32:17 +12:00
Josh Sharpe
54e7f5ba43
Tidy up the AR tests, removing duplicates and making tests clearer / more focussed.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2774 state:committed]
2009-08-08 14:53:35 +12:00
Mike Breen
e8dc151396
Add option to routes task to target a specific controller with CONTROLLER=x.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2928 state:committed]
2009-08-08 14:38:33 +12:00
Matt Duncan
5fdc33c1a3
Default sent_on time to now in ActionMailer
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#2607 state:committed]
2009-08-08 14:11:32 +12:00
wmoxam
98450fd168
Fix number_to_precision rounding error [ #2071 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2009-08-08 02:05:10 +01:00
Jeremy Kemper
43b406bdb0
Ruby 1.9 compat: fix route recognition encoding test
2009-08-07 17:16:34 -07:00
Jeremy Kemper
12c271d1d2
Ruby 1.9.2: implicit argument passing of super from method defined by define_method() is not supported
2009-08-07 17:04:56 -07:00
Jeremy Kemper
019ed5a7c0
Don't rely on T::U::TestCase#name
2009-08-07 17:04:19 -07:00
Jeremy Kemper
482a6f716f
Ruby 1.9.2: Object#id is gone now
2009-08-07 16:41:04 -07:00
Emilio Tagua
ae9e1e9f6d
Removed unused methods.
2009-08-07 17:55:36 -03:00
Emilio Tagua
d469ad8a49
Removed useless OR.
2009-08-07 16:41:58 -03:00
Brendan Schwartz
201387496e
Ruby 1.9 compat: fix for SSL in Active Resource
...
[#1272 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2009-08-07 12:24:02 -07:00
Jeremy Kemper
06afa48c8c
Merge branch 'oracle_enhanced'
2009-08-07 11:58:45 -07:00
Yehuda Katz
010a0c92eb
Rename find_by_parts and find_by_parts? to find and exists?
2009-08-07 15:00:12 -03:00
Emilio Tagua
6b5fab9300
Don't scope order in calculations.'
2009-08-07 14:33:35 -03:00
Emilio Tagua
04abe538ac
Merge commit 'rails/master'
2009-08-07 13:27:36 -03:00
Emilio Tagua
945ef58533
More work on removing plain SQL from associations and use ARel instead.
2009-08-07 13:16:34 -03:00
José Valim
55575e2165
Allow rails templates relative to the current path to be given.
2009-08-07 17:17:51 +02:00
José Valim
aed135d3e2
Renamed presenter to renderer, added some documentation and defined its API.
2009-08-07 17:17:51 +02:00
José Valim
1fd65c80fc
Encapsulate respond_with behavior in a presenter.
2009-08-07 17:16:16 +02:00
José Valim
7034272354
Add destroyed? to ActiveRecord, include tests for polymorphic urls for destroyed objects and refactor mime responds tests and documentation.
2009-08-07 17:16:16 +02:00
José Valim
f59984cc81
Add nagivational behavior to respond_with.
2009-08-07 17:16:15 +02:00
José Valim
c44f7e39f4
Updated vendored thor to 0.11.5
2009-08-07 17:16:15 +02:00
José Valim
e45e120af9
Merge branch 'master' of git://github.com/rails/rails into old
2009-08-07 17:13:44 +02:00
Yehuda Katz
bfe58ac05d
Get all ActionController partial rendering to use ActionView's partial code. Consequences:
...
* It is not possible to always pre-determine the layout before going to ActionView.
This was *already* broken for render :partial => @object, :layout => true. This is
now handled by overriding render_to_body in layouts.rb and manually injecting the
partial's response. This needs to be done in ActionController since ActionController
knows enough to get _layout_for_option. There is probably a better abstraction here.
* As a result, all partial rendering can correctly restrict their layouts to the mime
type of the rendered partial. This could have previously caused a bug in some edge cases.
* If other layout-like options are added, they might need to add special code for the
case of render :partial. We should try to think of an alternate solution, if possible,
but this works for the cases we know of now.
2009-08-07 11:33:54 -03:00
José Valim
dac8927b05
Merge branch 'master' of git://github.com/rails/rails into old
2009-08-07 16:10:17 +02:00
Yehuda Katz
606e950ccb
Whitespace
2009-08-07 06:32:54 -03:00
Yehuda Katz
d94ba11295
Continue reworking the partial path.
...
* TODO: Review ActionController calling render_template for certain partials.
Might we be able to save logic by always delegating to AV's render_partial?
2009-08-07 06:32:17 -03:00