Joshua Peek
8a9934a9d9
Added Memoizable mixin for caching simple lazy loaded attributes
2008-07-14 19:50:32 -05:00
Tarmo Tänav
d27dd860c7
Use sub instead of gsub
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-14 18:02:59 -05:00
Joshua Peek
9dc258d614
Eager load Partial variable_name and counter_name. Tidy up render_partial_collection.
2008-07-14 17:40:58 -05:00
Tiago Macedo
76df9fa068
Fix integer quoting issues in association preload. [ #602 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 23:34:19 +01:00
Gabe da Silveira
cd9b24286a
Add assert_sql helper method to check for specific SQL output in Active Record test suite. [ #325 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 23:22:39 +01:00
Jeremy Kemper
2d6562d51b
Move dead recompile_template? also
2008-07-14 13:51:59 -07:00
Jeremy Kemper
3fbefecc9c
Remove dead code from merge
2008-07-14 13:47:51 -07:00
Tarmo Tänav
07578ac855
Fixed mysql change_column_default to not make the column always nullable.
...
Also added change_column_null to both mysql and sqlite to keep the api features closer to postgresql.
[#617 state:resolved]
2008-07-14 12:42:01 -07:00
Tarmo Tänav
8f72bc92e2
Fixed test_rename_nonexistent_column for PostgreSQL
...
Also fixed ability to run migration_test.rb alone
[#616 state:resolved]
2008-07-14 12:22:27 -07:00
Jeremy Kemper
c760dbfd31
PostgreSQL: don't dump :limit => 4 for integers
2008-07-14 11:59:46 -07:00
Jeremy Kemper
4e323f6ef0
Fix bad merge
2008-07-14 11:50:07 -07:00
Jeremy Kemper
cdf0f1aa2e
Faster and clearer value_to_boolean
2008-07-14 11:41:56 -07:00
Jeremy Kemper
269c6c6bcf
Cache Module#parent_name
2008-07-14 10:46:16 -07:00
Jeremy Kemper
ae9356ae9e
Cache template loading for performance tests
2008-07-14 10:46:16 -07:00
Jeremy Kemper
425de8db6a
Use instance_method(...) to check whether the method exists
2008-07-14 10:46:15 -07:00
Jeremy Kemper
2167f95d85
Restore the more readable before_ and after_filters methods since they aren't called frequently
2008-07-14 10:11:53 -07:00
David Heinemeier Hansson
3037022789
Fixed that create database statements would always include "DEFAULT NULL" (Nick Sieger) [ #334 status:committed]
2008-07-14 10:12:54 -05:00
Sebastian A. Espindola
0176e6adb3
Added db:charset support to PostgreSQL. [ #556 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 04:11:52 +01:00
Tim Pope
5c08607082
Make script/plugin install <plugin> -r <revision> option work with git based plugins. [ #257 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 03:47:22 +01:00
David Dollar
e0750d6a5c
Add :accessible option to Associations for allowing mass assignments using hash. [ #474 state:resolved]
...
Allows nested Hashes (i.e. from nested forms) to hydrate the appropriate
ActiveRecord models.
class Post < ActiveRecord::Base
belongs_to :author, :accessible => true
has_many :comments, :accessible => true
end
post = Post.create({
:title => 'Accessible Attributes',
:author => { :name => 'David Dollar' },
:comments => [
{ :body => 'First Post!' },
{ :body => 'Nested Hashes are great!' }
]
})
post.comments << { :body => 'Another Comment' }
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:53:21 +01:00
Jason Dew
c6f397c5ce
Add block syntax to HasManyAssociation#build. [ #502 state:resolve]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:24:12 +01:00
Rhett Sutphin
d72c66532f
Make fixture accessors work when fixture name is not same as the table name. [ #124 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 02:01:52 +01:00
Jacek Becela
697ee1a50d
Enable loading fixtures from arbitrary locations. [ #586 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 01:32:01 +01:00
Pratik Naik
9783e66cad
Slightly faster DateTime#to_json. [ #598 state:resolved] [Alex Zepeda]
2008-07-14 01:02:07 +01:00
rsl
95812d5eaf
Ensure :index works with fields_for select methods. [ #518 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-14 00:55:57 +01:00
Tapajós
0d241f4434
Use full path in database tasks so commands will work outside of Rails root [ #612 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-13 14:19:03 -05:00
Joshua Peek
68fe898189
Check first render format and extension. Fixes failing ActionMailer test.
2008-07-13 14:05:21 -05:00
Joshua Peek
26bc867151
Small tweak to e0fef66
2008-07-13 14:00:40 -05:00
Joshua Peek
e0fef66149
Made ActionView::Base#first_render a little more private. And added _last_render to track the most recent render. Will fix #609 as a side effect. [ #609 state:resolved]
2008-07-13 13:26:48 -05:00
Joshua Peek
99cc85bc09
Set config.action_view.warn_cache_misses = true to receive a warning if you perform an action that results in an expensive disk operation that could be cached
2008-07-12 15:31:50 -05:00
Joshua Peek
73b34e9f75
Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class.
2008-07-12 14:33:46 -05:00
Joshua Peek
30204c4e66
Set global ActionController::Base.view_paths for test cases
2008-07-12 14:11:51 -05:00
Joshua Peek
65fb2e76f2
Removed a few implementation specific view path tests
2008-07-12 12:17:10 -05:00
Joshua Peek
b603de0882
Improve test coverage and create fixtures for RenderPartialWithRecordIdentificationTests
2008-07-12 12:17:10 -05:00
Daniel Guettler
f90eb81c65
Ensure script/generate finds generators from symlinked plugins. [ #449 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-12 17:51:48 +01:00
Michael Koziarski
e53f5fe696
Restore support for partial matches in assert_redirected_to
...
If both the actual redirection and the asserted redirection are hashes, succeed if the asserted redirection is a strict subset of the actual redirection.
2008-07-12 11:42:41 +02:00
Johan Sørensen
50b5c6845e
Ensure mail_to label is obfuscated for javascript encoding. [ #294 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-12 01:04:18 +01:00
Micah Wedemeyer
5e2e1ed9ff
Ensure MysqlAdapter allows SSL connection when only sslca is supplied. [ #253 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-11 23:52:41 +01:00
Joshua Peek
6ebdd0e32b
Changed ActionView::TemplateHandler#render API method signature to render(template, local_assigns = {})
2008-07-11 15:40:41 -05:00
Michael Koziarski
292501c7e0
Use require_dependency 'application' not require in the console bootstraps to avoid requiring application.rb twice
2008-07-11 22:27:36 +02:00
Michael Koziarski
6b9f8adb3e
Whitespace
2008-07-11 19:23:21 +02:00
Joshua Peek
c00baf496e
Added tests to show that 2d372d7 breaks old generator behavior ( #545 state:resolved)
2008-07-11 12:09:25 -05:00
Joshua Peek
f522a89d64
Revert "Fixed generator collisions for nested controller modules."
...
This reverts commit 2d372d7049 .
2008-07-11 12:05:02 -05:00
Joshua Peek
04a87af5b7
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:51:35 -05:00
Joshua Peek
d106f2d08a
Ensure use_accept_header is enabled for test_action_cache_conditional_options
2008-07-11 11:49:22 -05:00
Joshua Peek
15b2175426
Fixed teardown method typo (plus whitespace)
2008-07-11 11:44:24 -05:00
Joshua Peek
68289693f7
Check for response in builder template since ActionMailer does not have one
2008-07-11 11:14:59 -05:00
Joshua Peek
7d5c447d9c
Stubba is included in Mocha already
2008-07-11 11:12:53 -05:00
Clemens Kofler
feb08984ea
Added notes to Routing documentation and routes.rb regarding defaults routes opening the whole application for GET requests
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-07-10 09:29:27 +02:00
Jeremy Kemper
d37e641336
Move accept header parsing shortcut to Mime::Type.parse
2008-07-09 11:30:18 -07:00