Commit Graph

11703 Commits

Author SHA1 Message Date
Joshua Peek
511cef296b Tack format onto resource routes 2009-12-08 17:19:49 -06:00
Joshua Peek
2be5e088d2 Use new routing dsl in tests 2009-12-08 16:52:26 -06:00
Joshua Peek
ac711043ec Fix ambiguous access_token scoping example 2009-12-08 16:15:25 -06:00
Joshua Peek
ce5f27b04b Remove double scoping blocks and just use one 2009-12-08 16:13:00 -06:00
Joshua Peek
c4df6332a4 Seperate scope level for nesting resources 2009-12-08 16:06:46 -06:00
Joshua Peek
33658ea1ae Don't use name prefix by itself unless as is an empty string 2009-12-08 15:50:44 -06:00
Joshua Peek
3d91d7f0a2 Routes added under resource collection should be prefixed with
resource collection name
2009-12-08 15:31:56 -06:00
Joshua Peek
1fc58a889d Fixed named prefix scope in resource member and collection actions 2009-12-07 20:57:01 -06:00
Joshua Peek
0c34e3f41a Ignore name_prefix unless there is an explicit name 2009-12-07 20:11:57 -06:00
Joshua Peek
81d7227c9b Move base mapper methods into Base module so plugins can easily
extend the mapper
2009-12-07 19:59:23 -06:00
Joshua Peek
e86a82c52c Move name_prefix merging into Scoping concern 2009-12-07 19:50:13 -06:00
Joshua Peek
e600b41c7f Cleanup resource scoping by passing down the parent resource object
in the scope
2009-12-07 19:47:47 -06:00
Joshua Peek
5835447b6f named_prefix doesn't join with "_" 2009-12-07 19:31:29 -06:00
Joshua Peek
e8489b43e2 Allow name_prefix to be pass into scope 2009-12-07 19:24:33 -06:00
Joshua Peek
40ad54e381 Allow scope to take :path and :controller options 2009-12-07 18:28:02 -06:00
Joshua Peek
66375434b6 Pass symbol in as route name when match is used with a symbol 2009-12-07 17:22:09 -06:00
Joshua Peek
48127c637c Deprecate recalling generation params when the defaults are nil 2009-12-06 20:40:07 -06:00
Jeremy Kemper
63e435955e Ruby 1.9.2: explicitly raise NoMethodError for explicit coercion attempts 2009-12-06 18:22:09 -08:00
Jeremy Kemper
071af66e9e Ruby 1.9.2: explicitly raise NoMethodError for explicit coercion attempts. Calling super gives us NameErrors. 2009-12-06 18:03:18 -08:00
Jeremy Kemper
adc2115132 Remove assert_raises usage that only test-unit 1 supports. Breaks minitest and test-unit 2. 2009-12-06 17:23:43 -08:00
Joshua Peek
4663f75f6b Update rackmount to fix some pending tests 2009-12-05 13:10:00 -06:00
Gabe da Silveira
32395899d7 Replace reset_counter_cache with reset_counters that has API inline with existing update_counters method
[#1211 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-03 23:25:11 -08:00
Ben Marini
e55284e825 Add support for Mysql column positioning via #add_column and #change_column
add_column and change_column in the Mysql adapter now accept some
additional options:
:first => true        # Put the column in front of all the columns
:after => column_name # Put the colmn after 'column_name'

add_column :new_col, :string, :first => true
add_column :another_col, :integer, :default => 0, :after => :new_col

[#3286 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-03 23:09:57 -08:00
Yehuda Katz
96e0638ce2 Should fix a few Sam Ruby fails. 2009-12-03 09:06:01 -08:00
Carlhuda
c1304098cc Reorganize autoloads:
* A new module (ActiveSupport::Autoload) is provide that extends
    autoloading with new behavior.
  * All autoloads in modules that have extended ActiveSupport::Autoload
    will be eagerly required in threadsafe environments
  * Autoloads can optionally leave off the path if the path is the same
    as full_constant_name.underscore
  * It is possible to specify that a group of autoloads live under an
    additional path. For instance, all of ActionDispatch's middlewares
    are ActionDispatch::MiddlewareName, but they live under 
    "action_dispatch/middlewares/middleware_name"
  * It is possible to specify that a group of autoloads are all found
    at the same path. For instance, a number of exceptions might all
    be declared there.
  * One consequence of this is that testing-related constants are not
    autoloaded. To get the testing helpers for a given component,
    require "component_name/test_case". For instance, "action_controller/test_case".
  * test_help.rb, which is automatically required by a Rails application's
    test helper, requires the test_case.rb for all active components, so
    this change will not be disruptive in existing or new applications.
2009-12-02 20:01:08 -08:00
Joshua Peek
399909b11c Use to_query in route query string generation 2009-12-02 15:23:26 -06:00
Joshua Peek
856d2fd874 Quick fix for not escaping []s (not ideal) 2009-12-02 15:17:08 -06:00
Joshua Peek
1ee9b40b18 Failing tests for to_param/to_query not escaping "[]" 2009-12-02 15:08:42 -06:00
Mat Brown
49e943c4f0 Fix instance_eval calls to association proxies
In the current stable, ActiveRecord::Associations::AssociationProxy#method_missing calls yield() if a block is given, causing the block to always be evaluated in its calling context. However, in the case of instance_eval, correct behavior requires that the block be passed directly to the @target, rather than being evaluated inside a different block. Incidentally, this also simplifies the code slightly.

[#3412 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-02 12:47:09 -08:00
Mike Breen
50c28e78c7 Implement ActiveRecord#reset_counter_cache
[#1211 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2009-12-02 12:20:00 -08:00
Joshua Peek
de2cd8e39f Merge branch 'master' of github.com:rails/rails 2009-12-02 14:12:35 -06:00
Joshua Peek
8db038227c Move controller namespace tracking into route set so it gets
reloaded in dev mode
2009-12-02 14:10:22 -06:00
Carlhuda
c446b1b12b Ignore all pkg files 2009-12-02 11:35:48 -08:00
Carlhuda
6680f9c4d7 Fix an ivar name conflict in Rails::Server 2009-12-02 11:35:47 -08:00
Carlhuda
fe41c7030b Stop evalling the environment file in favor of require + setting a Kernel#config. This will fix the bug where reopening classes caused them to be overwritten. 2009-12-02 11:35:47 -08:00
Carlhuda
39034997d1 Add support for bare ActiveSupport via config.active_support.bare 2009-12-02 11:35:47 -08:00
Carlhuda
8ff310aef4 Break up rails and railties:
* rails is now a metagem (gem install rails works as it does now)
* railties includes the glue layer, so you can easily declare dependencies
  on railties, actionpack, and actionmailer and not get ActiveRecord's rake
  tasks, initializers, etc.
2009-12-02 11:35:47 -08:00
Carlhuda
abfc4dad3e Remove global Rails initializers 2009-12-02 11:35:47 -08:00
Joshua Peek
4dee277a9b Stop escaping "[]" in query string 2009-12-02 12:46:14 -06:00
Joshua Peek
c0949cc8f6 Rackmount 0.3.0 2009-12-02 12:38:25 -06:00
Joshua Peek
84be6cfb64 Fork rack build nested query to support to_param 2009-12-02 12:33:33 -06:00
Jeremy Kemper
de40bc033a Ensure Cache-Control max-age is an integer 2009-12-02 03:23:00 -08:00
Joshua Peek
ad26f066fe Response#write is defined twice (this is why -w is good) 2009-12-01 23:29:28 -06:00
Joshua Peek
f22db809c9 Response#cache_control is defined later 2009-12-01 23:27:40 -06:00
Joshua Peek
e12380e787 Remove concat before overriding it 2009-12-01 23:25:24 -06:00
Joshua Peek
70d0b7c87a Fix parens warning in ajax test 2009-12-01 23:19:41 -06:00
Joshua Peek
75ae5bb022 cache_store and page_cache_directory are already defined in caching
and pages
2009-12-01 23:14:03 -06:00
Joshua Peek
5d9af09563 Silence known internal AM deprecation calls 2009-12-01 23:01:21 -06:00
Joshua Peek
97be8537eb Fix @renderer warning 2009-12-01 22:58:56 -06:00
Joshua Peek
2fbd6f46fd Simply track controller namespaces instead of a complete list of
possible controllers to route to
2009-12-01 22:48:42 -06:00