Commit Graph

16407 Commits

Author SHA1 Message Date
José Valim
7b98d2aa59 Reorganize the mailer generator a bit. 2010-04-30 12:11:38 +02:00
rohit
2c7f7738c3 more fixes and updated the changelog 2010-04-30 12:21:29 +05:30
rohit
0b41aa9b2c fixes to tags section 2010-04-30 12:09:53 +05:30
rohit
7d0027554b Rewrote Security para and a minor fix 2010-04-30 11:24:32 +05:30
Rohit Arondekar
0bd631419e Rewrote para for clarity and better reading 2010-04-29 22:39:08 -07:00
Brian Durand
d2a49e4b1f Update after_commit and after_rollback docs and tests to use new style API with an :on options instead of on_* suffix.
[#2991]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-29 18:26:19 -07:00
Carlhuda
c54c84b7b4 Move ActionMailer generator to AM 2010-04-29 16:45:57 -07:00
José Valim
b0a53c86ef Update thor dependency to 0.13.5 2010-04-29 23:25:40 +02:00
Brian Durand
da840d13da Add after_commit and after_rollback callbacks to ActiveRecord that are called after transactions either commit or rollback on all records saved or destroyed in the transaction.
[#2991 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-29 12:24:15 -07:00
Jeremy Kemper
20f0e9f320 Fix docs typo: app.middlewares -> app.middleware 2010-04-29 11:43:09 -07:00
Jeremy Kemper
fef31be2bc Add missing deprecation requires 2010-04-29 11:34:48 -07:00
Ben Orenstein
7c7e00b552 Small grammatical fix. 2010-04-29 12:46:10 -04:00
Ben Orenstein
f632df2828 Make output match code. 2010-04-29 12:41:56 -04:00
Ben Orenstein
90ef772ee6 Fix sentence fragment and improve wording in generated README. 2010-04-29 12:37:18 -04:00
Santiago Pastorino
199cb0f80b as changes named routes, path is the appropriate option in this case 2010-04-29 12:02:02 -03:00
Tore Darell
8d0bdbf0b7 Change %5b ([) to %5d (]) in escaped URL 2010-04-29 15:06:31 +02:00
Tore Darell
c68ff4b27f Replace send_data with send_file in "Sending files" example 2010-04-29 15:04:10 +02:00
Neeraj Singh
f4d174b211 making rake:migrate VERSION=0 a noop called in succession. [#2137 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 13:41:35 +02:00
Neeraj Singh
68c96fad55 Fix form builder and form helpers inconsistencies [#4432 state:resolved]
* datetime_select and select_datetime should be consistent as much as possible
* date_select and select_date should be consistent as much as possible
* time_select and select_time should be consistent as much as possible

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 13:40:55 +02:00
José Valim
3dfcb56e45 ActiveRecord middlewares should be inserted before AD::Cascade [#4493 state:resolved]. 2010-04-29 13:24:35 +02:00
Ravinder Singh
e9a9ef094e warn user if options are given before application name [#3435 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 13:00:17 +02:00
Neeraj Singh
d793d30776 ActionCachingTestController rescues from all exceptions. Making sure that all the tests check for valid response. [#4468 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 12:48:34 +02:00
José Valim
2e9af3638d Move several configuration values from Hash to ActiveSupport::XmlMini, which both Hash and Array depends on.
Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array.
2010-04-29 12:42:42 +02:00
José Valim
1bea5c755c Ops. Rename performance to profiler. 2010-04-29 09:31:06 +02:00
Neeraj Singh
580dd3b052 array.to_xml should be able to handle all types of data elements [#4490 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-29 09:04:34 +02:00
rohit
19e565d005 revert back to <b> tags instead of <strong> tags in the getting started guide 2010-04-29 12:30:01 +05:30
José Valim
1b816d5024 The rake task :environment now loads config/environment.rb instead of initializing the application on its own. This fixes [#4492 state:resolved] and also avoids the application being initialized twice in some rake tasks. 2010-04-29 08:39:52 +02:00
Ernie Miller
e33d304975 Fix eager loading of associations causing table name collisions
[#4463 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-28 20:28:51 -07:00
Jeremy Kemper
4e75cc59e7 object_id may be negative, producing an invalid symbol. h/t Markus Schirp 2010-04-28 15:20:35 -07:00
José Valim
209ab7e05b Fix failing test. 2010-04-28 23:42:55 +02:00
Santiago Pastorino
3afa4847d9 failing test for: validates_acceptance_of overrides database fields
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-28 23:35:13 +02:00
Santiago Pastorino
ce48b3103a Makes validates_acceptance_of to not override database fields [#4460 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-04-28 23:12:03 +02:00
Xavier Noria
b9ab4c780a Merge commit 'rails/master' 2010-04-28 13:41:21 -07:00
Jeremy Kemper
22184930ea Bundle json and yajl-ruby gems for AS::JSON testing 2010-04-28 09:02:45 -07:00
Cezary Baginski
1067a7be52 Fix BigDecimal JSON encoding test. [#4495 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-28 09:02:03 -07:00
Jeremy Kemper
fe93cd8bc5 Fix prototype grep depending on JSON encoding regexp as JavaScript regexp 2010-04-27 22:52:37 -07:00
rohit
8f1a5bfee1 readability fixes to two paras in Refactorization 2010-04-28 11:21:45 +05:30
rohit
edcbd33785 replaced <b> tag with <strong> tag in samples 2010-04-28 10:48:55 +05:30
rohit
9dea2f4d8e fixed para for better readability 2010-04-28 10:43:36 +05:30
rohit
56c48f8136 Fixed incomplete para 2010-04-28 10:38:06 +05:30
Curtis Hawthorne
7e06494e32 Destroy respects optimistic locking.
Now works with :dependent => :destroy and includes unit tests for that
case.  Also includes better error messages when updating/deleting stale
objects.

[#1966 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-27 21:53:51 -07:00
Nathan Weizenbaum
ef5dadaf93 Only run load hooks once a file has been fully loaded.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-27 21:37:40 -07:00
rohit
c6a8337851 added notice to all samples of show.html.erb of posts controller 2010-04-28 08:09:27 +05:30
rohit
033b1e68c0 added views dir to list of created things 2010-04-28 08:06:28 +05:30
Jeremy Kemper
7100c9d6ca Switch driver to pg. [#3635 state:resolved] 2010-04-27 17:08:01 -07:00
Xavier Noria
97b3936318 release notes: updates path to the rails command in the Rails repo 2010-04-27 22:43:55 +02:00
Brian Durand
ee51b51b60 ActiveSupport::Cache refactoring
All Caches

* Add default options to initializer that will be sent to all read, write, fetch, exist?, increment, and decrement
* Add support for the :expires_in option to fetch and write for all caches. Cache entries are stored with the create timestamp and a ttl so that expiration can be handled independently of the implementation.
* Add support for a :namespace option. This can be used to set a global prefix for cache entries.
* Deprecate expand_cache_key on ActiveSupport::Cache and move it to ActionController::Caching and ActionDispatch::Http::Cache since the logic in the method used some Rails specific environment variables and was only used by ActionPack classes. Not very DRY but there didn't seem to be a good shared spot and ActiveSupport really shouldn't be Rails specific.
* Add support for :race_condition_ttl to fetch. This setting can prevent race conditions on fetch calls where several processes try to regenerate a recently expired entry at once.
* Add support for :compress option to fetch and write which will compress any data over a configurable threshold.
* Nil values can now be stored in the cache and are distinct from cache misses for fetch.
* Easier API to create new implementations. Just need to implement the methods read_entry, write_entry, and delete_entry instead of overwriting existing methods.
* Since all cache implementations support storing objects, update the docs to state that ActiveCache::Cache::Store implementations should store objects. Keys, however, must be strings since some implementations require that.
* Increase test coverage.
* Document methods which are provided as convenience but which may not be universally available.

MemoryStore

* MemoryStore can now safely be used as the cache for single server sites.
* Make thread safe so that the default cache implementation used by Rails is thread safe. The overhead is minimal and it is still the fastest store available.
* Provide :size initialization option indicating the maximum size of the cache in memory (defaults to 32Mb).
* Add prune logic that removes the least recently used cache entries to keep the cache size from exceeding the max.
* Deprecated SynchronizedMemoryStore since it isn't needed anymore.

FileStore

* Escape key values so they will work as file names on all file systems, be consistent, and case sensitive
* Use a hash algorithm to segment the cache into sub directories so that a large cache doesn't exceed file system limits.
* FileStore can be slow so implement the LocalCache strategy to cache reads for the duration of a request.
* Add cleanup method to keep the disk from filling up with expired entries.
* Fix increment and decrement to use file system locks so they are consistent between processes.

MemCacheStore

* Support all keys. Previously keys with spaces in them would fail
* Deprecate CompressedMemCacheStore since it isn't needed anymore (use :compress => true)

[#4452 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-04-27 11:13:37 -07:00
Xavier Noria
1d63129eff use ordinary syntax for options to be well-formed in 1.8 2010-04-27 02:36:34 -07:00
wycats
91963e9e33 Merge branch 'master' of github.com:rails/rails 2010-04-26 23:32:30 -07:00
Jeremy Kemper
c1d7327071 JSON: encode objects that don't have a native JSON representation using to_hash, if available, instead of instance_values (the old fallback) or to_s (other encoders' default). Encode BigDecimal and Regexp encode as strings to conform with other encoders. Try to transcode non-UTF-8 strings. 2010-04-26 19:55:39 -07:00