Commit Graph

7703 Commits

Author SHA1 Message Date
Vijay Dev
e0efe48c45 Merge branch 'master' of github.com:lifo/docrails 2011-11-13 22:29:26 +05:30
José Valim
2591cc6692 Merge pull request #3617 from indirect/remote_ip
refactor RemoteIp middleware
2011-11-13 04:53:51 -08:00
Akira Matsuda
b74aedff3c Unneeded require memoizable 2011-11-12 23:15:54 +09:00
Andre Arko
317f4e2236 defer calculating the remote IP until requested 2011-11-12 00:45:31 -10:00
Andre Arko
9432163c60 refactor RemoteIp middleware
- return the last forwarded IP before REMOTE_ADDR to handle proxies
- remove completely superfluous RemoteIpGetter class
- remove duplication of trusted proxies regexp
- remove unused constant from Request
- move comments from Request to where they are actually relevant
- edit comments for clarity of purpose

The original code (confusingly) tried to return REMOTE_ADDR both at the beginning and the end of the chain of options. Since REMOTE_ADDR is _always_ set, this is kind of silly. This change leaves REMOTE_ADDR as the last option, so that proxied requests will be assigned the correct remote IP address.
2011-11-11 21:25:08 -10:00
Xavier Noria
c3035e1800 Merge pull request #3613 from mitio/fix-actionpack-responder-docs
Fix wording and minor typos in the Responder RDoc
2011-11-11 10:03:29 -08:00
Dimitar Dimitrov
a766d834a7 Fix wording and minor typos in the Responder RDoc 2011-11-11 19:52:38 +02:00
José Valim
bdd76fb5e3 Merge pull request #3592 from avakhov/av-highlight-regexp
Fix and simplify highlight regexp
2011-11-10 02:53:43 -08:00
José Valim
d2cfa982fd Merge pull request #3581 from amatsuda/metal_response_body_19
AC::Metal#response_body= stores different value in Ruby 1.8 and 1.9
2011-11-10 00:49:14 -08:00
Alexey Vakhov
b5c3987294 Fix and simplify highlight regexp 2011-11-10 11:26:42 +04:00
Alexey Vakhov
983a2dccaa Cosmetic fix in number_to_currency docs 2011-11-10 09:45:57 +04:00
Akira Matsuda
be7ab83b64 A test case to ensure that AC::Metal#response_body= always wraps the given value in an Array in both Ruby 1.8 and 1.9 (refs #3581) 2011-11-10 10:54:56 +09:00
Vijay Dev
cff1d751d0 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	railties/guides/source/active_record_querying.textile
2011-11-08 21:35:17 +05:30
Alexey Vakhov
979f3f894b Fix small typo in link_to_function doc 2011-11-08 18:01:19 +04:00
Bradford Folkens
bd559b0068 Fix trouble using :subdomain in development environment when using numeric addresses.
See-also pull request #3561 from 3-1-stable

    Otherwise the following occurs:

    TypeError: can't convert nil into String
        /Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/http/url.rb:75:in host_or_subdomain_and_domain'
        /Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/http/url.rb:37:in url_for'
        /Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/routing/url_for.rb:147:in test_subdomain_may_be_accepted_with_numeric_host'
        /Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in run'
        /Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/callbacks.rb:426:in send'
        /Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/callbacks.rb:81:in run'
2011-11-08 07:52:35 -06:00
Ivan Evtukhovich
cf0a96bc6a DrbStore removed from cache backends 2011-11-07 18:57:55 +04:00
Vijay Dev
6ac56ac93b fix incorrect code example 2011-11-07 17:58:03 +05:30
Akira Matsuda
cc3e738d89 Fix AC::Metal#response_body= to store same value on Ruby 1.8 and 1.9
This was because String#respond_to?(:each) differs in 1.8 and 1.9
2011-11-07 16:24:54 +09:00
Dalibor Nasevic
759906d512 Fixed stale doc in AbstractController::Layouts 2011-11-06 14:43:11 +01:00
Vijay Dev
17947cebc0 Merge branch 'master' of github.com:lifo/docrails 2011-11-06 17:27:44 +05:30
Jon Leighton
8a2f0a9623 RUBY_ENGINE is not defined on 1.8 2011-11-06 10:54:59 +00:00
Jon Leighton
fc988115f7 Implement a workaround for a bug in ruby-1.9.3p0.
The bug is that an error would be raised while attempting to convert a
template from one encoding to another.

Please see http://redmine.ruby-lang.org/issues/5564 for more details.

The workaround is to load all conversions into memory ahead of time,
and will only happen if the ruby version is *exactly* 1.9.3p0. The
hope is obviously that the underlying problem will be resolved in
the next patchlevel release of 1.9.3.
2011-11-06 10:40:00 +00:00
Jon Leighton
7776055e2d Revert "Skip test_default_external_works on the CI for Ruby 1.9.3."
This reverts commit 10773f94ea.
2011-11-06 10:39:59 +00:00
Alexey Vakhov
949b3e743f Docs cosmetic fixes in Action View form_helper.rb 2011-11-06 11:46:28 +04:00
Xavier Noria
4d9f779b54 bumps up sprockets 2011-11-05 15:33:36 -07:00
Jon Leighton
10773f94ea Skip test_default_external_works on the CI for Ruby 1.9.3.
This test is affected by a bug in Ruby 1.9.3p0 and trunk:
http://redmine.ruby-lang.org/issues/5564

Given we cannot fix it for ourselves, it is better to skip for now so
that we will easily see if further failures are introduced.

Jon Leighton is monitoring the bug report and will revert this when a
suitable solution is found (either a new Ruby release or a generic
workaround).

If you are using 1.9.3 in your app and have templates that are not in
UTF-8, you should add a workaround early on in the boot process. For
example, if your templates are Shift_JIS encoded, then add the
following in an initializer:

Encoding::Converter.new('Shift_JIS', 'UTF-8')
2011-11-05 16:42:53 +00:00
Vijay Dev
fdbc4e5f4e Merge branch 'master' of github.com:lifo/docrails 2011-11-05 20:45:11 +05:30
Vijay Dev
cb06727b6c add tests for the case where size is explicitly passed to number_field helper 2011-11-04 22:32:40 +05:30
Franck Verrot
1679aa56f3 Synchronize the gemspecs since CHANGELOG has been renamed to CHANGELOG.md 2011-11-04 14:46:39 +01:00
Jon Leighton
281272ad36 Convert CHANGELOGs to Markdown format.
Reasons:

 * Markdown reads well as plain text, but can also be formatted.
 * It will make it easier for people to read on the web as Github
   formats the Markdown nicely.
 * It will encourage a level of consistency when people are writing
   CHANGELOG entries.

The script used to perform the conversion is at
https://gist.github.com/1339263
2011-11-04 12:55:17 +00:00
Waseem Ahmad
56207a3f01 Remove 'size' attribute from number_field form helper fixes #3454
f.number_field generates <input type="number", size="30"../> which is
invalid HTML5. See: http://dev.w3.org/html5/spec/Overview.html#number-state
2011-11-04 15:03:02 +05:30
Jon Leighton
b5f908a7ad Stub find_template so that when handle_render_error is called in ActionView::Template, we get to see the actual underlying error rather than a NoMethodError.
This shows an encoding bug on Ruby 1.9.3.
2011-11-03 19:08:09 +00:00
Alexey Vakhov
a8468731f7 Fix javascript_include_tag examples in documentation 2011-11-03 09:02:11 +04:00
Alexey Vakhov
7463317115 Fix small typos in routing docs 2011-11-03 08:43:28 +04:00
Aviv Ben-Yosef
702aecb126 Fix typo in Dispatcher#controller documentation 2011-11-01 08:59:20 +02:00
Alexey Vakhov
5f4550889d Fix typo in constraints method documentation 2011-11-01 08:55:03 +04:00
Aaron Patterson
62a86748ae this should never return nil, so no use for "try" 2011-10-31 15:17:16 -04:00
Christopher Meiklejohn
6cbe4223a7 Ensure that the format isn't applied twice to the cache key, else it becomes impossible to target with expire_action. 2011-10-31 15:10:07 -04:00
Vijay Dev
c809de8291 Merge branch 'master' of github.com:lifo/docrails 2011-10-30 14:47:23 +05:30
Arun Agrawal
0c7c1dbc41 ActiveRecord is no more in controller directory. 2011-10-29 12:34:08 +05:30
Paul McMahon
07c4297282 Add missing type to number_field_tag documentation 2011-10-28 15:37:45 +09:00
Aaron Patterson
9027643798 scumbag 1.8: strings are enumerable :'( 2011-10-26 10:30:52 -07:00
Santiago Pastorino
408bbfe6bd Merge pull request #3435 from MDaubs/action_pack_deprecations
Fix deprecation warnings in action pack render tests
2011-10-26 00:36:36 -07:00
José Valim
80768b739e Responders now return 204 No Content for API requests without a response body (as in the new scaffold) 2011-10-26 09:31:56 +02:00
Aaron Patterson
450257c95b properly handle lists of lists. Thanks @adrianpike for reporting! 2011-10-25 17:44:17 -07:00
Matthew Daubert
f7e56a3ab6 Fix deprecation warnings in action pack test suite due to passing template formats in the template name. 2011-10-25 15:11:45 -04:00
mjy
e368583ba7 Adds missing closing regex slashes. 2011-10-25 15:08:28 -04:00
Nick Howard
a7641054d8 add namespacing when referring to ActionController::RedirectBackError 2011-10-25 10:39:20 -06:00
Arun Agrawal
244dcfea47 ActionPack test fix for RBX 2011-10-24 14:11:20 +05:30
Vijay Dev
337ff13be9 Merge pull request #3352 from arunagw/bump_sprockets
Bump sprockets
2011-10-22 13:01:24 -07:00