Commit Graph

9267 Commits

Author SHA1 Message Date
Vijay Dev
6431753851 copy edit the time_ago_in_words helper docs 2012-08-23 00:24:22 +05:30
Vijay Dev
8fbfeb1ef7 Merge pull request #7398 from iamvery/time_ago_in_words-docs
Extended documentation for `time_ago_in_words` helper
2012-08-22 11:44:58 -07:00
Vijay Dev
5c89e07596 Merge branch 'master' of github.com:lifo/docrails 2012-08-22 23:51:17 +05:30
José Valim
2801786e1a Get rid of config.preload_frameworks in favor of config.eager_load_namespaces
The new option allows any Ruby namespace to be registered and set
up for eager load. We are effectively exposing the structure existing
in Rails since v3.0 for all developers in order to make their applications
thread-safe and CoW friendly.
2012-08-21 14:47:19 -03:00
Rafael Mendonça França
684a040437 Add CHANGELOG entry for #7410 2012-08-21 13:43:43 -03:00
Sandeep
99322266b8 option_tags coerced to "" instead of nil 2012-08-21 21:59:05 +05:30
Rafael Mendonça França
7e68e8bcc7 Merge pull request #7406 from janko-m/documentation_fixes
Fixed some documentation mistakes
2012-08-21 08:04:19 -07:00
Janko Marohnić
2033db171a Fix documentation mistakes 2012-08-21 16:58:34 +02:00
Pratik Naik
6a5d1c765f Make sure :via works with mount 2012-08-20 10:25:23 -05:00
Jay Hayes
807a9774a0 Extended documentation for time_ago_in_words helper 2012-08-20 10:03:16 -05:00
tomykaira
503c1c04ad Access @rs only through attr_accessor 2012-08-20 21:47:00 +09:00
Jim Jones
4848bf321b Added X-Content-Type-Options to the header defaults.
With a value of "nosniff", this prevents Internet Explorer from MIME-sniffing a response away from the declared content-type.
2012-08-18 15:29:58 -07:00
hollowspace
ed491ae3ef Fix slightly broken Markdown syntax in actionpack/CHANGELOG.md 2012-08-17 10:33:45 +04:00
Rafael Mendonça França
2a42b12d3b Remove the active_model require from action_dispatch.
Since we removed the ActiveModel dependenxy from ActionPack at
166dbaa7526a96fdf046f093f25b0a134b277a68 we don't need to require it
anymore.

Closes #7370
2012-08-16 16:04:18 -03:00
Evan Farrar
7c584256d1 Make a doc example output in match actual output
Make doc output in grouped_options_for_select divider example match
actual output. The options groups were in backwards order of actual.
2012-08-15 19:52:52 -04:00
Vijay Dev
176f0888d8 Merge branch 'master' of github.com:lifo/docrails 2012-08-16 00:07:17 +05:30
Vijay Dev
62499bcb9d copy edits [ci skip] 2012-08-16 00:05:47 +05:30
Carlos Antonio da Silva
ebb4a3d5be Merge pull request #7244 from lucasuyezu/master
Fix indentation on template errors to consider line number character count.

For instance, when an error is shown, if the related source code snippet has line numbers from, lets say, 8-12, the lines are left aligned, which means the code indent is wrong:

    8: foo
    9: bar
    10: raise
    11: baz
    12: ...

This changes it to right align the source code snippet, so that the indentation is correct:

     8: foo
     9: bar
    10: raise
    11: baz
    12: ...
2012-08-15 09:15:31 -07:00
Erich Menge
6e84026091 Minor language fix. [ci skip] 2012-08-15 08:21:30 -05:00
David Heinemeier Hansson
0d0d46222c Add Request#formats=(extensions) that lets you set multiple formats directly in a prioritized order 2012-08-14 22:09:43 -05:00
Rafael Mendonça França
0bd7b07dff Add CHANGELOG entry and documentation for Routing Concerns 2012-08-13 21:43:18 -03:00
Rafael Mendonça França
546497d027 Extract common controllers to abstract_unit 2012-08-13 21:43:18 -03:00
Rafael Mendonça França
0dd24728a0 Implementing Routing Concerns
This pattern was introduced as a plugin by @dhh.

The original implementation can be found in
https://github.com/rails/routing_concerns
2012-08-13 21:41:53 -03:00
Lucas Uyezu
6446e84c1a Indentation should consider line number character count. 2012-08-13 18:49:47 -03:00
Aaron Patterson
38a3fed404 push header merge down to a private method so that live responses can have their own header object 2012-08-13 14:20:04 -04:00
Aaron Patterson
8f0541b702 live response headers can be merged with a hash 2012-08-13 13:57:26 -04:00
Evan Tann
1edc7cd78b Add support for start_hour and end_hour options in select_hour helper
Updated documentation to demonstrate start_hour and end_hour options
2012-08-13 12:26:23 -04:00
Edward Ocampo-Gooding
d9c9d685b6 Grammar fix in ActionView docs/comments 2012-08-12 17:26:13 -03:00
Ellis Berner
f7f70841b8 Missing closing tag 2012-08-12 11:26:56 -07:00
Carlos Antonio da Silva
a513cc1862 Ensure option_html_attributes does not modify the given option hashes
We can avoid creating extra hashes with #merge, and use #merge! instead.
2012-08-11 14:17:01 -03:00
Carlos Antonio da Silva
e8e8617c39 Simplify html attributes generation for options_for_select
Further simplify the option_html_attributes method after the changes
introduced in dacbcbe55745aa9e5484b10b11f65ccca7db1c54 to not escape the
html options here (since they're going to be escaped down the chain in
content tag).
2012-08-11 14:04:22 -03:00
Rafael Mendonça França
8781b266b9 Sync CHANGELOGs [ci skip] 2012-08-11 13:13:58 -03:00
Rafael Mendonça França
347f8c5325 Add CHANGELOG entry for #7314 2012-08-11 12:55:55 -03:00
Rafael Mendonça França
a6e0d8cfcf Merge pull request #7314 from schneems/schneems/form_for_error
Check for Blank Record in form_for
2012-08-10 20:09:21 -07:00
Rafael Mendonça França
feff27d38a Merge pull request #7329 from guilleiguaran/move-default-headers-ad-railtie
Move AD default_headers configurations to railtie
2012-08-10 20:08:09 -07:00
schneems
60b650b18c check for nil or empty record in form_for
if nil or an empty array is passed into form_for you get a horrible error message, this one is much more indicative of what the programmer needs to know to fix the problem.
2012-08-10 22:02:48 -05:00
Carlos Antonio da Silva
ac7e1700f1 Further refactor build_conditions in route set
Return the conditions from the keep_if call, and ignore the value
argument since it's not being used.
2012-08-10 23:58:47 -03:00
Guillermo Iguaran
c347236ce9 Move AD default_headers configurations to railtie
ActionDispatch railtie is a better place for
config.action_dispatch.default_headers settings, users can continue
overriding those settings in their configuration files if needed.
2012-08-10 21:11:56 -05:00
Piotr Sarnacki
5b3bb61f3f Fix handling SCRIPT_NAME from within mounted engine's
When you mount your application at a path, for example /myapp, server
should set SCRIPT_NAME to /myapp. With such information, rails
application knows that it's mounted at /myapp path and it should generate
routes relative to that path.

Before this patch, rails handled SCRIPT_NAME correctly only for regular
apps, but it failed to do it for mounted engines. The solution was to
hardcode default_url_options[:script_name], which is not the best answer
- it will work only when application is mounted at a fixed path.

This patch fixes the situation by respecting original value of
SCRIPT_NAME when generating application's routes from engine and the
other way round - when you generate engine's routes from application.

This is done by using one of 2 pieces of information in env - current
SCRIPT_NAME or SCRIPT_NAME for a corresponding router. This is because
we have 2 cases to handle:

- generating engine's route from application: in this situation
  SCRIPT_NAME is basically SCRIPT_NAME set by the server and it
  indicates the place where application is mounted, so we can just pass
  it as :original_script_name in url_options. :original_script_name is
  used because if we use :script_name, router will ignore generating
  prefix for engine

- generating application's route from engine: in this situation we
  already lost information about the SCRIPT_NAME that server used. For
  example if application is mounted at /myapp and engine is mounted at
  /blog, at this point SCRIPT_NAME is equal /myapp/blog. Because of that
  we need to keep reference to /myapp SCRIPT_NAME by binding it to the
  current router. Later on we can extract it and use when generating url

Please note that starting from now you *should not* use
default_url_options[:script_name] explicitly if your server already
passes correct SCRIPT_NAME to rack env.

(closes #6933)
2012-08-11 00:21:46 +02:00
Santiago Pastorino
f2557112a5 Merge pull request #7321 from bogdan/refactor_routes_set
RouteSet: refactor internals
2012-08-10 10:32:06 -07:00
Santiago Pastorino
0b11dbe2fe Add 'X-Frame-Options' => 'SAMEORIGIN' and 'X-XSS-Protection' => '1; mode=block' CHANGELOG entry 2012-08-10 13:19:09 -03:00
Bogdan Gusiev
79a0c8cf7f RouteSet: refactor internals
No need to build valid_conditions array.
We can get all the data in place.
2012-08-10 11:54:47 +03:00
brainopia
e157903310 Test actual content of permanent cookie 2012-08-10 09:48:26 +04:00
Aaron Patterson
581a927710 set the controller under test so we no longer need the reset! method 2012-08-09 18:06:13 -07:00
Santiago Pastorino
d8cf713afa Do not mark strip_tags result as html_safe
Thanks to Marek Labos & Nethemba

CVE-2012-3465
2012-08-09 18:51:05 -03:00
Aaron Patterson
c63d17c2be push drawing once to it's own module 2012-08-09 14:50:27 -07:00
Aaron Patterson
1e8c0a29d0 refactor the before_setup hooks to a module 2012-08-09 14:50:26 -07:00
Aaron Patterson
0b29c7bb7b switch callbacks to minitest hooks 2012-08-09 14:50:26 -07:00
Aaron Patterson
6794e92b20 Merge pull request #7302 from homakov/default_headers
Introduce default_headers. closes #6311 #6515
2012-08-09 13:38:29 -07:00
Aaron Patterson
6a3d4695f0 initialize instance variables 2012-08-09 11:21:58 -07:00