Santiago Pastorino
8a005ff504
Merge pull request #3000 from guilleiguaran/fix-relative-url-root
...
Fix for relative url root in assets
2011-09-13 02:29:33 -07:00
Guillermo Iguaran
f509b6988b
Fix for relative url root in assets
2011-09-13 04:27:30 -05:00
Santiago Pastorino
536bb7b135
Merge pull request #2996 from guilleiguaran/move-assets-tests
...
Move asset tests to assets_test file
2011-09-13 01:27:58 -07:00
Guillermo Iguaran
e767cda6ea
Move asset tests to assets_test file
2011-09-13 03:19:02 -05:00
Santiago Pastorino
5bad79d930
always rewrite_relative_url_root
2011-09-13 00:27:29 -07:00
Santiago Pastorino
f1c3903f5c
Merge pull request #2993 from deepakprasanna/generator_test_fix
...
fixed the failing generators_test in railties.
2011-09-12 23:51:23 -07:00
Deepak Prasanna
73e8dd189b
fixed the failing generators_test
2011-09-13 11:59:40 +05:30
Santiago Pastorino
b0cee70354
Merge pull request #2977 from guilleiguaran/fix-relative-root-in-assets
...
Set relative url root in assets when controller isn't available for Sprockets
2011-09-12 23:25:28 -07:00
Santiago Pastorino
038e45a2b6
Merge pull request #2987 from kennyj/master
...
fix https://github.com/rails/rails/issues/2947 (with testcase)
2011-09-12 23:04:14 -07:00
Guillermo Iguaran
9279d1102c
Set relative url root in assets when controller isn't available for Sprockets. Fix #2435
...
See https://github.com/rails/sass-rails/issues/42 for details
2011-09-13 01:02:44 -05:00
Aaron Patterson
f65b2215cd
removing backwards compatibility module
2011-09-12 16:50:49 -07:00
Aaron Patterson
68ec26c70c
point rails at Journey for dev and edge
2011-09-12 16:50:49 -07:00
Aaron Patterson
ea7ef9597e
partially expand the parameters to match
2011-09-12 16:50:49 -07:00
Aaron Patterson
ad1a891649
unfactor the Route class to private factory methods
2011-09-12 16:50:49 -07:00
Aaron Patterson
943aa826a4
reduce dependencies of external objects in the Route class
2011-09-12 16:50:49 -07:00
Aaron Patterson
f5ab6805ed
delete unused code, pass path explicitly to journey
2011-09-12 16:50:49 -07:00
Aaron Patterson
d21e0e2af3
adjust route inspection to work with Journey
2011-09-12 16:50:48 -07:00
Aaron Patterson
a08bee7841
all routes can be stored in the Journey Routes object
2011-09-12 16:50:48 -07:00
Aaron Patterson
b7ccfa96d2
clear! does not need to be called from initialize
2011-09-12 16:50:48 -07:00
Aaron Patterson
59b9fe961d
reuse the route collection and formatter by clearing them
2011-09-12 16:50:48 -07:00
Aaron Patterson
4ffe667ab7
Instantiate each part of our routing system:
...
* A collection of Routes
* The Router, which consults the collection of routes
* A formatter that consults the collection of routes
2011-09-12 16:50:48 -07:00
Aaron Patterson
537ed6eb2f
stop freezing the routes
2011-09-12 16:50:47 -07:00
Aaron Patterson
a05a9ff1ca
stop using a hash for parameterizing
2011-09-12 16:50:47 -07:00
Aaron Patterson
5f0b37c486
Switching rack-mount to journey.
2011-09-12 16:50:47 -07:00
Jon Leighton
1a421ceccb
Deprecate using method_missing for attributes that are columns.
...
This shouldn't ever happen unless people are doing something
particularly weird, but adding a deprecation in case there are bugs not
caught by our tests.
2011-09-13 00:03:09 +01:00
Jon Leighton
c89e1c7bde
Add an attribute_missing method to ActiveModel::AttributeMethods.
...
This can be overloaded by implementors if necessary.
2011-09-13 00:02:33 +01:00
Jon Leighton
6d8dbeca6b
Avoid double super call in some cases.
...
If super was false earlier, it is still going to be false, so we don't
need to call it again at the end of the method.
2011-09-13 00:01:58 +01:00
Jon Leighton
ac687ed651
Let Ruby deal with method visibility.
...
Check respond_to_without_attributes? in method_missing. If there is any
method that responds (even private), let super handle it and raise
NoMethodError if necessary.
2011-09-13 00:01:58 +01:00
Jon Leighton
cf115d2f8e
Reset column info when messing with columns.
...
We are subclassing Session here, but messing with the columns will
affect the attribute methods defined on the Session superclass, and
therefore other tests, unless we properly isolate it by resetting column
info before and after the test run.
2011-09-13 00:01:58 +01:00
Jon Leighton
eecfa84a90
Always generate attribute methods on the base class.
...
This fixes a situation I encountered where a subclass would cache the
name of a generated attribute method in @_defined_class_methods. Then,
when the superclass has it's attribute methods undefined, the subclass
would always have to dispatch through method_missing, because the
presence of the attribute in @_defined_class_methods would mean that it
is never generated again, even if undefine_attribute_methods is called
on the subclass.
There various other confusing edge cases like this. STI classes share
columns, so let's just keep all the attribute method generation state
isolated to the base class.
2011-09-13 00:01:58 +01:00
Jon Leighton
50d395f96e
Raise error when using write_attribute with a non-existent attribute.
...
Previously we would just silently write the attribute. This can lead to
subtle bugs (for example, see the change in AutosaveAssociation where a
through association would wrongly gain an attribute.
Also, ensuring that we never gain any new attributes after
initialization will allow me to reduce our dependence on method_missing.
2011-09-13 00:01:58 +01:00
Jon Leighton
8667d3aeb6
Make protected method public so we avoid method_missing.
2011-09-13 00:01:58 +01:00
Jon Leighton
3386a089ef
Fix warnings.
...
Make sure we don't redefine an already-defined attribute method.
2011-09-13 00:01:57 +01:00
Jon Leighton
99bd6b53da
Add deprecation for doing attribute_method_suffix ''
2011-09-13 00:01:57 +01:00
Jon Leighton
93d574c962
refactoring
2011-09-13 00:01:57 +01:00
Jon Leighton
8b8b7143ef
Use an empty AttributeMethodMatcher by default.
...
This means that attribute methods which don't exist will get generated
when define_attribute_methods is called, so we don't have to use hacks
like `attribute_method_suffix ''`.
2011-09-13 00:01:57 +01:00
Jon Leighton
8d59e0b263
Alias id= if necessary, rather than relying on method_missing
2011-09-13 00:01:57 +01:00
Santiago Pastorino
1a4ea1bc97
Merge pull request #2988 from guilleiguaran/remove-extra-line
...
Remove odd asignation
2011-09-12 11:49:43 -07:00
Guillermo Iguaran
f746927889
Remove odd asignation
2011-09-12 13:16:55 -05:00
kennyj
21eaba4c39
fix https://github.com/rails/rails/issues/2947 (with testcase)
2011-09-13 02:59:57 +09:00
José Valim
e9db21743b
Use the proper executable on tests.
2011-09-12 10:53:20 -07:00
Santiago Pastorino
d762e22c04
Merge pull request #2985 from kennyj/master
...
fix https://github.com/rails/rails/issues/2582 (with testcase)
2011-09-12 10:18:19 -07:00
Jon Leighton
8397a564cb
Merge pull request #2678 from jmileham/ares_content_length_bug
...
ActiveResource shouldn't rely on the presence of Content-Length
2011-09-12 10:11:39 -07:00
kennyj
3ce830272e
fix https://github.com/rails/rails/issues/2582 (with testcase)
2011-09-13 01:06:31 +09:00
José Valim
11fa70dd09
Just provide the executable for railtie. This should be fine since Rubygems now warns before overriding them.
2011-09-12 09:05:11 -07:00
Xavier Noria
63082af306
Merge pull request #2984 from jrgifford/master
...
Added getting_started application to railties/guides/code/getting_started
2011-09-12 07:49:36 -07:00
James Gifford
d7154d4832
Added getting_started code, updated guide with link to rails github repo and path to code
2011-09-12 10:30:45 -04:00
Santiago Pastorino
4bcacc8066
Merge pull request #2936 from joelmoss/migration_status
...
db:migrate:status not looking at all migration paths
2011-09-11 17:06:21 -07:00
John Mileham
a06d17480f
ActiveResource shouldn't rely on the presence of Content-Length
2011-09-11 14:46:50 -04:00
Vijay Dev
95fdaf965a
Merge branch 'master' of github.com:lifo/docrails
2011-09-11 17:41:39 +05:30