Commit Graph

2844 Commits

Author SHA1 Message Date
José Valim
7da88c5b29 Remove stream at the class level.
This is because only template rendering works with streaming.
Setting it at the class level was also changing the behavior
of JSON and XML responses, closes #1337.
2011-07-06 20:24:30 -03:00
Xavier Noria
289b5253ce Merge branch 'master' of git://github.com/lifo/docrails 2011-07-05 01:42:13 +02:00
Vijay Dev
2949e30a05 document handle_unverified_request method 2011-07-02 21:18:46 +05:30
Vijay Dev
5fe67fa7a3 update doc about resetting the session in case of authenticity token mismatch 2011-07-01 00:00:38 +05:30
José Valim
9c9ec2172e Make sure respond_with with :js tries to render a template in all cases 2011-06-30 11:47:36 -03:00
José Valim
c690b7124d [IMPORTANT] Make "sprockets/railtie" require explicit.
This makes "sprockets/railtie" explicit. This means that sprockets will
be loaded when you require "rails/all". If you are not using requiring
"rails/all", you need to manually load it with all other framework
railties.

In order to be complete, this commit also adds --skip-sprockets to
the rails generator.
2011-06-29 09:41:16 -03:00
Esad Hajdarevic
2a61d47b55 Make send_file guess content-type from file extension, if type wasn't supplied (Issue #1847). Update tests & documentation. 2011-06-28 06:58:28 +02:00
Matt Jankowski
2fd1f2e843 clarify which url would be used to cache a page when options are not provided to #cache_page to determine that url 2011-06-26 19:44:55 -04:00
Matt Jankowski
eccd5cb610 elaborate on how web server configuration to check for static files on disk enables page caching to work without hitting the app server stack 2011-06-26 19:41:49 -04:00
James Cox
d446c798a5 make the logs a little simpler to view, put the render message inline with other events, pull processing to char[0] and add a new line to the completed. looks more like a block now, which is useful for serial actions like test/dev 2011-06-24 13:10:06 -07:00
Xavier Noria
1f505a8ef2 Merge branch 'master' of git://github.com/lifo/docrails 2011-06-23 18:08:11 +02:00
Matt Jankowski
620bee45fe more detail on how the flow between redirect and show works, and minor grammar 2011-06-21 10:47:37 -04:00
Jeroen Jacobs
791127eee4 Fixes an issue where cache sweepers with only after filters would have no controller object
It would raise undefined method controller_name for nil
2011-06-21 12:34:00 +02:00
Santiago Pastorino
4131fd7c79 Call super here to allow SessionHash initialize new stuff for us 2011-06-19 22:00:22 -03:00
Christine Yen
0a67b745be Tweak linebreak in ActionController::Redirecting doc 2011-06-15 03:18:28 -07:00
Christine Yen
8da91036c0 Improve documentation around status code argument of redirect_to 2011-06-15 01:55:57 -07:00
Santiago Pastorino
1d3618a9b4 remove warning: assigned but unused variable 2011-06-08 00:26:09 -03:00
Piotr Sarnacki
a6c5cc2377 Added missing assert to test checking form with namespaced isolated model and fixed helpers to work correctly in such case 2011-06-07 02:40:41 +02:00
Xavier Noria
5e21247131 Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
	activerecord/RUNNING_UNIT_TESTS
2011-06-06 22:23:30 +02:00
Guillermo Iguaran
c2c8ef57d6 Remove trailing white-spaces 2011-06-05 10:34:40 -05:00
Andrew White
e864ff7259 Add backward compatibility for testing cookies
This commit restores the ability to assign cookies for testing via
@request.env['HTTP_COOKIE'] and @request.cookies, e.g:

    @request.env['HTTP_COOKIE'] = 'user_name=david'
    get :index
    assert_equal 'david', cookies[:user_name]

and

    @request.cookies[:user_name] = 'david'
    get :index
    assert_equal 'david', cookies[:user_name]

Assigning via cookies[] is the preferred method and will take precedence
over the other two methods. This is so that cookies set in controller
actions have precedence and are carried over between calls to get, post, etc.
2011-06-05 12:34:27 +01:00
Vijay Dev
fc9ff8cf41 some grammatical corrections 2011-06-04 20:12:25 +05:30
Andrew White
d4658d86fe Refactor ActionController::TestCase cookies
Assigning cookies for test cases should now use cookies[], e.g:

  cookies[:email] = 'user@example.com'
  get :index
  assert_equal 'user@example.com', cookies[:email]

To clear the cookies, use clear, e.g:

  cookies.clear
  get :index
  assert_nil cookies[:email]

We now no longer write out HTTP_COOKIE and the cookie jar is
persistent between requests so if you need to manipulate the environment
for your test you need to do it before the cookie jar is created.
2011-06-04 07:09:11 +01:00
Guillermo Iguaran
529d2deb5e Removing trailing white-spaces 2011-05-31 20:55:50 -07:00
José Valim
a46b03e728 Merge pull request #1203 from dchelimsky/stringify-parameter-values-in-tests
Stringify param values in controller tests.
2011-05-28 12:43:13 -07:00
José Valim
ec08bfc035 Merge pull request #1324 from dmathieu/no_error_on_invalid_format
Don't raise an exception if the format isn't recognized
2011-05-26 02:29:23 -07:00
dmathieu
16571f9c42 don't raise an exception if the format isn't recognized
Fixed while traveling to heuruko
2011-05-26 11:18:30 +02:00
Xavier Noria
00e1d0832e Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
	actionmailer/lib/action_mailer/base.rb
	activesupport/lib/active_support/core_ext/kernel/requires.rb
2011-05-25 22:48:47 +02:00
Dmytrii Nagirniak
8f003de2c7 fix minor spelling mistakes in comments 2011-05-23 22:40:29 -07:00
Sebastian Martinez
fcdb5dc557 Remove extra white spaces on ActionPack docs. 2011-05-23 20:22:33 -03:00
Jon Leighton
d411c85a65 Replace references to ActiveSupport::SecureRandom with just SecureRandom, and require 'securerandom' from the stdlib when active support is required. 2011-05-23 20:25:44 +01:00
David Chelimsky
3f0c71c852 use to_param (and change method to name accordingly)
- exclude Rack::Test::UploadedFile to pass existing tests. Are there any
  other types we're missing?
2011-05-22 08:13:22 -04:00
David Chelimsky
9277e72a3c Stringify param values in controller tests.
This reduces false positives that come from using ints in params in
tests, which do not get converted to strings in the tests. In
implementations going through rack, they do get converted to strings.

- David Chelimsky and Sam Umbach
2011-05-22 02:47:54 -04:00
Josh Kalderimis
968596fa7f renamed the wrap_parameters :only and :except options to :include and :exclude to make it consistent with controller filters 2011-05-19 10:33:25 -04:00
José Valim
760dec17be Use anonymous? that works on both Ruby 1.8 and 1.9. 2011-05-17 14:51:44 -04:00
David Chelimsky
13950a8cc9 add more robust test for wrapping params with anonymous class 2011-05-17 06:57:14 -04:00
Andy Lindeman
ee82e1c301 Add fix for error when an anonymous controller subclasses ApplicationController 2011-05-17 06:57:04 -04:00
Prem Sichanugrist
d77b306b63 Make ParamsWrapper calling newly introduced Model.attribute_names instead of .column_names 2011-05-15 19:07:44 -04:00
Prem Sichanugrist
3bed43c6a5 Do not try to call column_names on the abstract class.
Normally the table for abstract class won't be existed, so we should not trying to call `#column_names` on it.
2011-05-15 00:41:20 -04:00
Xavier Noria
d491130236 Merge branch 'master' of git://github.com/lifo/docrails
Conflicts:
	actionpack/lib/action_view/helpers/date_helper.rb
	railties/lib/rails/generators/rails/app/templates/config/initializers/wrap_parameters.rb.tt
2011-05-14 11:21:27 +02:00
Xavier Noria
e5524d538c minor edits after going through what's new in docrails 2011-05-14 11:15:43 +02:00
Nick Sutterer
e1ceae576e added an example for AC::UrlFor usage to make usage simpler. 2011-05-12 09:58:26 +02:00
Nick Sutterer
e3b3f416b5 added docs for AbC::UrlFor and AC::UrlFor. 2011-05-12 09:31:36 +02:00
José Valim
a87894ae57 Get around weird missing constant error caused by AS instead of simply raising NameError, closes #477. 2011-05-11 00:08:43 +02:00
José Valim
59705deeaf Warn if we cannot verify CSRF token authenticity 2011-05-09 17:23:41 +02:00
José Valim
0e886fe10e Merge pull request #280 from jballanc/frozen-string-strip-tags
Stripping tags from a frozen string
2011-05-07 03:44:19 -07:00
José Valim
c515f64f72 Use .ref instead of .to_sym. 2011-05-07 02:22:17 +02:00
José Valim
9c2c25c1a1 Revert to old semantics, use available_action? instead of action_method?. 2011-05-06 18:44:18 +02:00
José Valim
d42bb68430 More updates to ivars list. 2011-05-06 14:57:25 +02:00
José Valim
894bdbd53d Move variables to underscore format, update protected instance variables list. 2011-05-06 14:57:25 +02:00