Commit Graph

3170 Commits

Author SHA1 Message Date
Krekoten' Marjan
a75d21df06 Fix status initialization when custom status provided
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-18 17:34:22 -02:00
Andrew White
f7573175de Reset assert_template instance variables between requests [#5832 state:resolved] 2010-10-18 09:57:51 +01:00
Santiago Pastorino
ea7db8ebc1 number_to_phone always return safe 2010-10-17 20:42:13 -02:00
Stephen Celis
5e79094fc1 HTML5 data attribute helpers [#5825 state:resolved]. 2010-10-18 11:18:42 +13:00
Xavier Noria
21ff8849bb in regexps, the dot in a character class is not a metacharacter 2010-10-15 16:31:00 +02:00
André Camargo
c42ea2172e Fix for ActionView::Template#refresh in rails 3.1.0.beta
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-15 08:39:10 +02:00
José Valim
01ab6f961b Remove :cache => true on lookup templates initialization. 2010-10-14 09:47:49 +02:00
José Valim
37d78028b2 render :once should consider the current controller prefix. 2010-10-14 09:27:18 +02:00
Les Hill and Sandro Turriate
dde54f00c6 Show exceptions rescues the original exception
[#5784 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-12 00:56:07 +02:00
Szymon Nowak
0d33332571 Return a valid empty JSON on successful PUT and DELETE requests. [#5199 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-12 00:56:07 +02:00
Aditya Sanghi
582a088ba7 Fix test helpers to ensure get method forms are properly tested [#5753 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-12 00:56:07 +02:00
Miles Egan
3eff729079 make sure request parameters are accessible after rack throws an exception parsing the query string [#3030 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-12 00:56:07 +02:00
Paco Guzman
31358d8c3c data-disable-with in button_to helper
[#4993 state:committed]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-11 13:24:07 -02:00
Santiago Pastorino
cb26eee54d Revert "Make InstanceTagMethods#value_before_type_cast raise if the model don't respond to attr_before_type_cast or attr method"
And    "Makes form_helper use overriden model accessors"

This reverts commit 3ba8e31005 and fb0bd8c109.
2010-10-10 21:13:12 -02:00
José Valim
5ec27189b8 Do not allow templates coming from Fallback resolvers to store a virtual path. 2010-10-10 23:12:23 +02:00
José Valim
682368d4ba Use identifiers for template equality. 2010-10-10 23:12:22 +02:00
José Valim
49b6f33f99 Clean up unused methods from AV::Base and pass in the template object on rendering. 2010-10-10 14:47:11 +02:00
José Valim
11aa515735 Add expire! and rerender to the template API. This will be used by SASS template handler. 2010-10-10 13:43:32 +02:00
José Valim
ffa32714bd Add some unit tests to Template#refresh. 2010-10-10 13:17:04 +02:00
José Valim
940b57789f Add support to render :once.
This will be used internally by sprockets to ensure requires are executed just once.
2010-10-10 12:43:26 +02:00
wycats
8cb2cfbf71 Fix a few bugs when trying to use Head standalone 2010-10-10 00:54:11 -07:00
José Valim
38d78f99d5 Resolvers now consider timestamps.
Before this patch, every request in development caused the template
to be compiled, regardless if it was updated in the filesystem or not.
This patch now checks the timestamp and only compiles it again if
any change was done.

While this probably won't show any difference for current setups,
but it will be useful for asset template handlers (like SASS), as
compiling their templates is slower than ERb, Haml, etc.
2010-10-10 09:26:53 +02:00
José Valim
c7408a0e40 Deprecate old template handler API. Remove old handlers. 2010-10-10 01:14:50 +02:00
José Valim
64c7f7e392 Add more docs and tests to templates. 2010-10-09 23:56:08 +02:00
José Valim
54b09e17d4 Fix 1.9.2 failures. 2010-10-08 09:24:06 +02:00
Michael Koziarski
581b2b6836 fix rendering a partial with an array as its :object [#5746 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>

Conflicts:

	actionpack/lib/action_view/render/partials.rb
2010-10-08 11:12:11 +13:00
José Valim
c7760809bf Allow cache to be temporarily disabled through lookup_context. 2010-10-07 21:31:31 +02:00
José Valim
c563f10f3e render :template => 'foo/bar.json' now works as it should. 2010-10-07 21:31:31 +02:00
José Valim
b2600bfc18 Remove locals dependency from template.
This means that templates does not need to store its source anymore, allowing us to reduce the ammount of memory taken by our Rails processes. Naively speaking, if your app/views contains 2MB of files, each of your processes (after being hit by a bunch of requests) will take 2MB less of memory after this commit.

This is extremely important for the upcoming features. Since Rails will also render CSS and JS files, their source won't be stored as well allowing us to decrease the ammount of memory taken.
2010-10-07 21:31:31 +02:00
Aaron Patterson
5769636663 fixing a few test warnings 2010-10-04 19:32:49 -07:00
Aaron Patterson
1217339616 only forwarding enough methods to work. People should grab the delegate tempfile if they really need to do hard work 2010-10-04 19:28:40 -07:00
Aaron Patterson
3370ad0b1e making sure respond_to? works properly 2010-10-04 17:11:50 -07:00
Aaron Patterson
8a97470210 raising an argument error if tempfile is not provided 2010-10-04 17:08:25 -07:00
Aaron Patterson
876acf001a if it walks like a duck and talks like a duck, it must be a duck 2010-10-04 16:57:11 -07:00
Aaron Patterson
2a3022db7f delegate to the @tempfile instance variable 2010-10-04 16:56:45 -07:00
Aaron Patterson
f9734f2b0f adding tests for uploaded file 2010-10-04 16:30:16 -07:00
José Valim
0b51f3cc73 Ensure the proper content type is returned for static files. 2010-10-04 18:06:04 +02:00
Aaron Patterson
18a7b767e8 moving fake model to the correct file 2010-10-03 14:40:06 -07:00
José Valim
74dd8a3681 Move ETag and ConditionalGet logic from AD::Response to the middleware stack. 2010-10-03 21:25:22 +02:00
José Valim
50215f9525 Rely on Rack::Session stores API for more compatibility across the Ruby world. 2010-10-03 21:24:22 +02:00
David Chelimsky
f656796d05 Rename _assigns to view_assigns in AV::TC
- also add tests
- also deprecate _assigns

[#5751 state:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-03 13:30:31 -02:00
Aditya Sanghi
297cf0b266 added test for form_for with search_field
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-02 17:48:12 +02:00
Aaron Patterson
3eb7f9adee removing more duplicate code. :'( 2010-10-01 18:09:37 -07:00
Aaron Patterson
50cf5c11a1 fixing warnings with regexps on assert_match 2010-10-01 18:07:19 -07:00
Aaron Patterson
ffbcb84c21 removing more duplicate code 2010-10-01 18:05:59 -07:00
Aaron Patterson
44f85678e9 delete repeated code 2010-10-01 18:01:34 -07:00
Aaron Patterson
dfa331ae15 use a method that actually exists 2010-10-01 17:54:50 -07:00
Piotr Sarnacki
22b11a41cc Allow mounting engines at '/'
Without that commit script_name always become '/', which
results in paths like //posts/1 instead of /posts/1
2010-09-30 09:47:05 +02:00
Aaron Patterson
1c0be7baac fixing space error 2010-09-29 11:47:54 -07:00
Emilio Tagua
6371e5b99f We can't assign @view_context_class here, define super() in test instead if we want to avoid warnings. 2010-09-29 14:35:24 -03:00