Andrew White
91b52c795f
Normalize recall params when the route is not a standard route otherwise :controller and :action may appear in the generated url [ #4326 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-27 09:23:36 +02:00
Aaron Patterson
abd568bf1c
removing useless code. [ #4988 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-26 19:51:59 -07:00
Santiago Pastorino
8d9545389f
Refactor: metaprogramming here it's confusing and make use of tap
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-26 19:44:44 -07:00
David Trasbo
0abf4b0746
Change reference to Test::Unit::AssertionFailedError to the generic ActiveSupport::TestCase::Assertion [ #4987 state:commited]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-26 18:45:20 -07:00
Santiago Pastorino
8f358f397f
Refactor of column_exists? method and this works with PostgreSQL
2010-06-26 17:09:46 -07:00
Santiago Pastorino
64fee27a55
Removes useless flatten
2010-06-26 17:09:40 -07:00
Evgeniy Dolzhenko
a39f2657b1
Add module_eval missing file_name and line_number args [ #4712 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 22:38:54 +02:00
Aaron Patterson
100d2282e3
adding adapter tests, avoiding private apis, fixing code in 1.9 [ #4986 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 22:37:45 +02:00
José Valim
5b91c97763
Create a little bit less objects in ARel.
2010-06-26 22:37:24 +02:00
Santiago Pastorino
926ca9c102
Load JSON additions (as to_json) on active_support/all.
...
[#4730 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 21:15:18 +02:00
Santiago Pastorino
51be8dbded
Move constantize from conversions to inflections.
...
This removes ActiveModel dependency on TZInfo.
[#4979 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 20:49:30 +02:00
David Trasbo
df083b482d
Make sure ActiveResource::Errors#from_json doesn't pass nil to #from_array [ #3650 state:commited]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 19:23:10 +02:00
José Valim
7eb5766bd1
Small changes to responder:
...
* resources is always an array;
* Lazy retrieve request and formats;
* Alias api_location and navigation_location to resource_location, making easier to change its behavior without affecting each other and without a need to reimplement any of the behavior methods.
2010-06-26 15:48:47 +02:00
José Valim
3782010377
Oops. Make previous commit pass on 1.9.2.
2010-06-26 12:14:25 +02:00
José Valim
aa48ab05f4
Tidy up tests in previous commit since they did not assure an OrderedHash is returned (the test would pass for an array and would pass by chance for hashes).
...
[#4875 state:resolved]
2010-06-26 12:09:56 +02:00
chaitanyav
9958950f78
Add OrderedHash#invert to preserve order in ruby 1.8 [ #4875 ]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 12:05:25 +02:00
Andrew White
d4e1a2ef0d
Support optional static segements as well [ #4832 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 12:02:29 +02:00
Paul Barry
59b24ceb0c
Fixed normalize_path in Routing::Mapper to handle optional prefix segments with static and dynamic parts
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 12:02:24 +02:00
José Valim
7bd85a8fc2
Work around the fact the JSON gem was overwriting to_json implementation for all Ruby core classes.
...
This is required because the JSON gem is incompatible with Rails behavior and was not allowing ActiveModel::Errors to be serialized.
So we need to ensure Rails implementation is the one triggered. [#4890 state:resolved]
2010-06-26 12:01:13 +02:00
Norman Clarke
cfaaed3f40
Move some methods into 1.8.x-only proxy. [ #4978 state:resolved]
...
These methods had been overridden because they had bugs on 1.9.1. Since
Rails now supports only 1.9.2, and these methods now work properly on
that version, there's no longer any need to override them.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 10:16:37 +02:00
Andrew White
9a6fc9a540
Don't force pluralization of controller name when defining a resource [ #4980 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 10:16:30 +02:00
Andrew White
bba19603c2
URL fragments should not have safe characters escaped. Ref: Appendix A, http://tools.ietf.org/rfc/rfc3986.txt
...
[#4762 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-25 18:05:40 -07:00
Aaron Patterson
6e65573222
refactoring the postgres adapter index method to avoid inject and use values_at. [ #4976 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 01:35:38 +02:00
Santiago Pastorino
47134a04bb
blocks removed from all the ActiveRelation query_methods, extend method added instead
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 01:35:23 +02:00
José Valim
026cec3390
Merge branch 'tago'
2010-06-26 01:08:57 +02:00
Andrew White
11ff3da5f4
Add column and index query methods to ActiveRecord::Schema
...
[#4219 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 01:08:32 +02:00
Aaron Patterson
4464d10e68
index dump should not include full text indexes. Thanks Ken Mayer for the original patch! [ #4949 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 00:59:38 +02:00
Santiago Pastorino
65aa6a7db1
reorder method added to ActiveRelation
...
[#4972 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 00:59:12 +02:00
Santiago Pastorino
a2513aea07
Test for concatenated orders added
...
[#4972 ]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 00:59:11 +02:00
rohit
cae33c4158
Remove previously defined class method logger to supress warnings in Active Support test suites. [ #4618 state:open]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-26 00:27:31 +02:00
Paul Mucur
158e22dae0
Alias ActiveSupport::OrderedHash#update to ActiveSupport::OrderedHash.merge!
...
This ensures that an OrderedHash's keys are set up appropriately when using update.
[#4973 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-25 15:02:20 -07:00
Aaron Patterson
5e2b473b47
reorganizing adapter specific tests. [ #4974 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-25 14:47:14 -07:00
Santiago Pastorino
efbd0eb9f7
Order is not guaranteed here, ordering by id of people table makes it work
2010-06-25 12:44:57 -07:00
wycats
ccc8eba4dc
Change the generated Gemfile to resolve, via documentation, the issue of rspec generators being unavailable in development mode
2010-06-25 12:19:22 -07:00
Neeraj Singh and Santiago Pastorino
0ebb5bf659
Support for multiple selects added
...
[#4841 state:committed]
2010-06-25 15:57:04 -03:00
Santiago Pastorino
3d8ccb9240
Makes a build_select for the select part of build_arel
2010-06-25 15:06:32 -03:00
Santiago Pastorino
82dc16b7d2
Metaprogramming not needed here
2010-06-25 15:06:32 -03:00
Santiago Pastorino
3344c011da
Avoid a blank line before the add/remove columns
2010-06-25 15:06:32 -03:00
Andrew White
5f64bce10f
Failing test for whether glob parameters accept regexps
...
[#4970 state:committed]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-25 10:17:28 -07:00
Andrew White
3d8200318a
Add failing test case for parameters with periods
...
[#2536 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-25 10:12:11 -07:00
Jeremy Kemper
0883b2b0c3
Depend on unreleased rack-mount 0.6.6.pre
2010-06-25 10:11:46 -07:00
José Valim
01472b5217
Do not mark the session as loaded if an error happened while doing it.
2010-06-25 19:03:00 +02:00
José Valim
21c99e9388
Calling exists? in the session store, without checking for stale sessions, was causing the cookie store to panic because we need to unpack the whole session to get its key. This commit fixes this issue and also caches exists calls for performance improvements.
2010-06-25 12:15:17 +02:00
Łukasz Strzałkowski
518b16d9ae
Line break in migration template and nicer code indentation
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-25 10:57:05 +02:00
Carlos Antonio da Silva
b01df28413
Do not wrap hidden fields with error proc [ #4962 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-25 09:49:29 +02:00
Prem Sichanugrist
617e94658d
Make sure that Rails doesn't resent session_id cookie over and over again if it's already there [ #2485 state:resolved]
...
This apply to only Active Record store and Memcached store, as they both store only the session_id, which will be unchanged, in the cookie.
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-25 09:41:52 +02:00
José Valim
a12b76b09e
Just reading flash messages should not create a session if one does not exist yet.
2010-06-25 09:36:26 +02:00
David Heinemeier Hansson
6682cce038
Dont reload the environment, just not needed bro
2010-06-24 17:38:46 -05:00
Neeraj Singh
4e8ca7bc9a
adding missing assertion and fixing the test
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-24 20:34:51 +02:00
Neeraj Singh
0d2cebe338
fixing test by replacing assert with assert_equal
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-24 20:34:46 +02:00