Vijay Dev
48b580a03b
Merge branch 'master' of github.com:lifo/docrails
2011-11-18 23:11:46 +05:30
Vijay Dev
5a2db4c7c3
put back the removed eg
2011-11-18 23:09:30 +05:30
Edward Anderson
fe88745d5f
Fix a number_with_delimiter :separator example
2011-11-17 20:10:49 -05:00
lest
e8d57f361a
_html translation should escape interpolated arguments
2011-11-17 23:07:39 +00:00
Xavier Noria
1079724fe6
Revert "warn the user values are directly interpolated into _html translation strings"
...
Reason: After another round of discussion, it has been
decided to let interpolation deal with unsafe strings
as it should do.
This reverts commit d57d8098fc .
2011-11-17 23:59:19 +01:00
Xavier Noria
d57d8098fc
warn the user values are directly interpolated into _html translation strings
2011-11-17 23:07:06 +01:00
José Valim
e2d3060a68
Merge pull request #3654 from wildchild/label_i18n
...
Fix impractical I18n lookup in nested fields_for
2011-11-17 00:02:49 -08:00
Arun Agrawal
c3ae1d2aec
It should be @calculated_ip not @calculate_ip
...
We are using @calculated_ip.
@calculate_ip is no where used
2011-11-17 12:50:19 +05:30
Alexander Uvarov
c2b6f63bbe
Fix impractical I18n lookup in nested fields_for
2011-11-17 12:37:00 +06:00
Aaron Patterson
e367142255
Initialize our instance variables.
2011-11-16 16:55:11 -08:00
Aaron Patterson
70f9b74a49
Merge pull request #3649 from indirect/remote_ip
...
Fixes for Request#remote_ip (no middleware, all proxies)
2011-11-16 16:44:09 -08:00
Jon Leighton
272f2b778f
Merge pull request #3500 from olivierlacan/error-whitespace
...
CSS fix to prevent error output from being breaking out of body element.
2011-11-16 15:26:31 -08:00
Andre Arko
a9044d0117
the object itself isn't the IP, #to_s is the IP
2011-11-16 13:13:22 -10:00
Andre Arko
5621abd569
🤦 Request#remote_ip has to work without the middleware
2011-11-16 12:54:18 -10:00
Andre Arko
f05ccf805a
Revert "Revert "Merge pull request #3640 from indirect/remote_ip""
...
This reverts commit 8d1a2b3ecd , because I have fixed the issues this commit caused in the next commit.
2011-11-16 12:53:43 -10:00
Jon Leighton
3a6a10a36d
Switch from marshal format to plain text for the encoding conversions dump. This is for windows compatibility. Fixes #3644 .
2011-11-16 21:38:06 +00:00
Jon Leighton
8d1a2b3ecd
Revert "Merge pull request #3640 from indirect/remote_ip"
...
This reverts commit 6491aadc52 , reversing
changes made to 83bf0b626c .
See https://github.com/rails/rails/pull/3640#issuecomment-2752761 for
explanation.
2011-11-15 22:47:18 +00:00
Andre Arko
d743954792
GetIp#to_s should never return nil. That's icky.
2011-11-14 16:43:21 -10:00
Andre Arko
4f2bf6491c
Return the calculated remote_ip or ip
...
This was an especially nasty bug introduced in 317f4e2 , by the way that an instance of GetIp is not nil, but GetIp#to_s could sometimes return nil. Gross, huh?
2011-11-14 11:23:33 -10:00
Andre Arko
cda1a5d5fe
memoize the relatively expensive remote IP code
2011-11-14 11:20:57 -10:00
Andre Arko
00a0a4ddeb
cleaner names
2011-11-14 11:20:20 -10:00
Andre Arko
9c4532bf74
remove ignored flag, fixes warnings
2011-11-13 10:22:12 -10:00
Andre Arko
2d063c6269
turns out the tests expect remote_addrs.first
2011-11-13 10:20:55 -10:00
Andre Arko
2189bff732
correctly raise IpSpoofAttackError message
2011-11-13 10:20:29 -10:00
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
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
Alexey Vakhov
949b3e743f
Docs cosmetic fixes in Action View form_helper.rb
2011-11-06 11:46:28 +04:00
Vijay Dev
fdbc4e5f4e
Merge branch 'master' of github.com:lifo/docrails
2011-11-05 20:45:11 +05:30
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
Olivier Lacan
a50f659e08
CSS fix to prevent error output from being breaking out of body element.
...
Using the white-space: pre-wrap adds extra line breaks to prevent the text from breaking out of the element's box. In this case single line output can be extremely long, breaking out the <body> element.
See for reference: http://www.quirksmode.org/css/whitespace.html
Before: http://link.olivierlacan.com/BVU4
After: http://link.olivierlacan.com/BUfM
2011-11-03 10:01:32 -04:00
Alexey Vakhov
a8468731f7
Fix javascript_include_tag examples in documentation
2011-11-03 09:02:11 +04:00