Commit Graph

2901 Commits

Author SHA1 Message Date
José Valim
6788db824a Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved] 2010-06-24 13:23:43 +02:00
Michael Lovitt
49f52c3d91 Sessions should not be created until written to and session data should be destroyed on reset.
[#4938]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-23 11:56:35 -07:00
David Chelimsky
32b8be9533 Expose view via the view() method in AV::TestCase::Behavior
- was exposed as _view, which suggested it was private
- left _view as an alias of view as not to break any extensions that are
  relying on _view

[#4932 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 17:45:48 +02:00
David Chelimsky
0e0df4b0c5 In ActionView::TestCase::Behavior, assign variables right before
rendering the view.

- Previously, _assigns were locked down the first time _view was
  referenced.

[#4931 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 15:07:44 +02:00
Jeff Dean
ac8d3e3aca make text_field and hidden_field omit the value attribute if the developer explicitly passes in :value => nil [#4839 state:resolved]
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2010-06-23 16:23:54 +12:00
knapo
995b1a243c Fix controller_name for non default controller paths [#4901 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 01:37:52 +02:00
José Valim
ed5c096d60 Tidy up asset tag a bit and make railties tests green again. 2010-06-23 01:34:25 +02:00
Josh Kalderimis
97b773303d refactored the javascript asset tag helpers and moved the default scripts setup within the railtie
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 01:02:59 +02:00
Carlos Antonio da Silva
9651ca751c Add the :path option to match routes when given as symbols. This is specially useful in http helpers for generating routes in scenarios like:
resources :users, :path => 'usuarios' do
    get :search, :on => :collection, :path => 'pesquisar'
  end

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-23 00:49:15 +02:00
José Valim
61317b643a Provive resources_path_names helpers in the router. 2010-06-23 00:43:25 +02:00
Carlos Antonio da Silva
aacb83143f Allow namespace accept options in routes [#4936 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 23:37:49 +02:00
José Valim
fef5cf92ed Deprecate :name_prefix in the new router DSL. 2010-06-22 23:30:19 +02:00
Neeraj Singh
dcfb9805f2 test for #4862
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 15:10:49 +02:00
David Chelimsky
0576ec4ddd Add support for specifying locals in view tests with assert template [#4927 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-22 14:51:22 +02:00
José Valim
02399a1184 Ensure overwritten callbacks conditions in controllers work [#4761 state:resolved] [#3913 state:resolved] 2010-06-22 07:57:45 +02:00
Thibaud Guillaume-Gentil
5522578d16 Fixed date_select date_separator when discard_month and/or discard_day are true [#4856 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 12:33:02 +02:00
Carlos Antonio da Silva
f9abbf9a4d Adding missing test to autolink with other protocols (file) [#4886 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 12:32:41 +02:00
Jan De Poorter
96f5e59a26 Make sure a namespaced <%= render form %> still renders the _form partial [#4784 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:58:10 +02:00
David Chelimsky
86002a0dfe Support render_template in view tests. Useful for specifying which
partials are rendered under different conditions.

[#4903 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:26:42 +02:00
Andrew White
1f84061c5c Don't use module to work out shallow name prefix and path as it may not accurately reflect the actual namespace [#4899 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:15:48 +02:00
Andrew White
ed3f042e99 Make polymorphic_url and scaffolding work with uncountable resources [#3930 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:15:41 +02:00
Andrew White
65ce3d1297 Accept an object for :constraints option [#4904 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-20 00:15:30 +02:00
Wincent Colaiuta
728b9eccad option_groups_from_collection_for_select should return HTML-safe string [#4879 state:resolved]
Signed-off-by: Xavier Noria <fxn@hashref.com>
2010-06-19 17:22:49 +02:00
Andrew White
bf59717b43 Custom resource routes should be scoped
[#3765]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-19 00:15:06 -07:00
David Genord II
a186431414 form_for without :html and with :remote should not error
[#4902 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-18 13:59:28 -07:00
Josh Kalderimis
9d3eeb9053 fix for :shallow in router not generating helpers for create, update, and destroy actions when :only or :except are used
[#4900 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-06-18 13:59:14 -07:00
Santiago Pastorino
84d387bc0f Make text_helpers methods which return valid html to return it as safe and sanitize the input always unless :sanitize => false is set
[#4825 state:committed]

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-06-17 13:34:10 -05:00
Andrew White
6db9558416 Add shallow routing option to new router [#3765 status:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-06-17 09:52:55 -05:00
Santiago Pastorino
7240a960f2 excerpt shoudn't return safe output test added
[#4878]

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-06-17 09:41:04 -05:00
Wincent Colaiuta
a424808df9 truncate() should not try to produce HTML-safe output
As discussed in Lighthouse ticket #4825 and ticket #4878, the truncate()
method cannot guarantee safe output for all possible inputs/offsets, so
it is best to leave the output unsafe so that it gets escaped when used
in a view.

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-06-17 09:41:04 -05:00
Xavier Noria
f17159b029 edit pass: the names of Rails components have a space, ie, "Active Record", not "ActiveRecord" 2010-06-14 23:22:04 +02:00
Neeraj Singh
e574ca920d render(:inline) in a layout before yield replaces original content
[#4777 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-13 13:56:08 +02:00
rohit
7508c0e9d3 Change sanitize to escape in test names of text_helper_test [#4844 state:resolved] 2010-06-12 15:34:05 +02:00
Jeremy Kemper
acad3ba848 Ruby 1.9.1 compat: constant lookup 2010-06-11 11:00:56 -07:00
Santiago Pastorino
b4976ce91b text_helper now escape the unsafe input instead of sanitizing
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-11 16:34:53 +02:00
Rizwan Reza
51ad68367a Added tests for cookies with domain option. 2010-06-11 16:34:53 +02:00
Rizwan Reza
132730d5db Moved test/controller/cookie_test.rb to test/dispatch/cookies_test.rb 2010-06-11 16:34:53 +02:00
Rizwan Reza
edbb78d6cc The previous commit didn't work with complex domains, which is now fixed. 2010-06-11 16:34:52 +02:00
Rizwan Reza
44830ead1c Add support for multi-subdomain session by setting cookie host in session cookie so you can share session between www.example.com, example.com and user.example.com. [#4818 state:resolved]
This reverts commit 330a89072a493aafef1e07c3558964477f85adf0.
2010-06-11 16:34:52 +02:00
José Valim
330a89072a Revert "Add support for multi-subdomain session by setting cookie host in session cookie so you can share session between www.example.com, example.com and user.example.com. [#4818 state:resolved]"
It does not work for domains like co.uk and com.br.

This reverts commit c4d6245e875bbb276c122a5a401422d341dac4df.
2010-06-10 20:08:01 +02:00
Alan Harper
566967eaf3 Missing method error doesn't specify which controller it is missing from [#4436 state:resolved]
The error page shown when the method you are requesting on a controller
doesn't specify which controller the method is missing from

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-10 20:04:37 +02:00
José Valim
51590ad175 Remove punctuate_body! No code in lib was using it and it had no documentation. 2010-06-10 19:49:10 +02:00
Guillermo Álvarez
c4d6245e87 Add support for multi-subdomain session by setting cookie host in session cookie so you can share session between www.example.com, example.com and user.example.com. [#4818 state:resolved]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2010-06-10 12:05:12 -04:00
Santiago Pastorino
0919c0dbca Removed textilize, textilize_without_paragraph and markdown helpers
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-09 10:06:14 +02:00
Neeraj Singh
f48aa14bf4 Better test for ticket [#3914 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-09 09:51:05 +02:00
José Valim
5c9f27abaa Add more cases to previous commit [#4394 state:resolved] 2010-06-08 23:26:51 +02:00
Jan De Poorter
4560385fa4 Make sure namespaces are nested within resources
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-08 23:21:53 +02:00
Neeraj Singh
db23a95a61 cache_sweeper yields blank output
[#3914 state:open]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-08 23:20:04 +02:00
David Heinemeier Hansson
03be27092b Revert "Add shallow routes to the new router" for now. Needs more work.
This reverts commit 67a60ee314f53abcde78f8ecd2a1f7c9ef8264e1.
2010-06-08 16:20:46 -04:00
David Chelimsky
bdcf70cca8 Memoize the object returned by _view in ActionView::TestCase::Behavior
[#4799 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-08 21:25:31 +02:00