Commit Graph

2312 Commits

Author SHA1 Message Date
Aaron Patterson
1ce0cc0d38 Merge branch 'master' of github.com:rails/rails
* 'master' of github.com:rails/rails:
  For our build, stick with mail 2.5.x for now
  Correct result, previously showing wrong result
  Collapse PG default extractoin of most types to single regex
  Change wording of explanation about precision & scale of decimal numbers [ci skip]
  Cleaned up duplicated CHANGELOG entry [ci skip]
  reuse available belongs_to? method
  Convert StrongParameters cache to a hash. This fixes an unbounded memory leak demonstrated on @tenderlove's latest blog post:
  Partially revert deprecation of *_filter
  Pluralize params
  Add default_i18n_subject to the guides
  Fix regression on eager loading association based on SQL query rather than existing column.
  Relax mail gem constraint from ~> 2.5.4 to ~> 2.5, >= 2.5.4
  Keep column defaults in type cast form
  Return a null column when no column exists for an attribute
  Refactor XML serializer to not depend on `serialized_attributes`
  Test the serialized types of virtual columns in XML
  implement ActiveRecord::Base#pretty_print + changelog
  Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
2014-06-04 11:45:53 -07:00
Aaron Patterson
3f7e482aed push splitting "to" up the callstack 2014-06-03 16:23:39 -07:00
Rafael Mendonça França
18d19bf2a4 Merge pull request #15349 from tgxworld/remove_duplicated_method_call
Remove duplicated HashWithIndifferentAccess#with_indifferent_access.
2014-06-03 19:10:33 -03:00
Aaron Patterson
cc26b6b7bc Routes specifying 'to:' must be a string that contains a "#" or a rack
application.  Use of a symbol should be replaced with `action: symbol`.
Use of a string without a "#" should be replaced with `controller: string`.
2014-06-03 14:05:42 -07:00
Aaron Patterson
af1c8665cd push some options munging to an alternate constructor 2014-06-03 11:33:54 -07:00
Aaron Patterson
522038aa9d move options_constraints tests next to each other 2014-06-03 11:33:53 -07:00
Aaron Patterson
5029c371fe only do is_a checks on formatted once 2014-06-03 11:33:53 -07:00
Aaron Patterson
10c1787b30 push options_constraints processing up
this lets us reduce is_a checks on the options_constraints and push
"callable constraints" verification to the right place.
2014-06-03 11:33:53 -07:00
Aaron Patterson
eaaf8995b1 remove options as an ivar 2014-06-03 11:33:53 -07:00
Aaron Patterson
981029b3ff only do Regexp === option once 2014-06-03 11:33:53 -07:00
Aaron Patterson
404feeb2e4 return early from add_request_method 2014-06-03 11:33:53 -07:00
Aaron Patterson
92d16ec158 only loop over options once (hopefully) 2014-06-03 11:33:53 -07:00
Aaron Patterson
c0fc116fb4 only loop through constraints once 2014-06-03 11:33:52 -07:00
Aaron Patterson
4d3955aef4 change defaults allocation to a one-liner 2014-06-03 11:33:52 -07:00
Aaron Patterson
d00bbe64ae no longer need the scope ivar 2014-06-03 11:33:52 -07:00
Aaron Patterson
03de3a02c7 only look up scope[:module] once 2014-06-03 11:33:52 -07:00
Aaron Patterson
43d2105a1e remove IGNORE_OPTIONS 2014-06-03 11:33:52 -07:00
Aaron Patterson
5b71006cac :only is never used in Mapping, so rm the key 2014-06-03 11:33:52 -07:00
Aaron Patterson
c94504cf88 remove :defaults from the IGNORE_OPTIONS list 2014-06-03 11:33:52 -07:00
Aaron Patterson
82f115758e remove :constraints from IGNORE_OPTIONS 2014-06-03 11:33:52 -07:00
Aaron Patterson
3346d52248 disconnect normalize_defaults! from options[:constraints] 2014-06-03 11:33:51 -07:00
Aaron Patterson
496e25aab7 disconnect options and scope from the blocks method 2014-06-03 11:33:51 -07:00
Aaron Patterson
e975b7d04e disconnect the constraints method from the options and scope hashes 2014-06-03 11:33:51 -07:00
Aaron Patterson
4bc441c6f8 :on is removed from options before the Mapping is instantiated, so remove it from IGNORE_OPTIONS 2014-06-03 11:33:51 -07:00
Aaron Patterson
fb9f01b6c4 pull up via extraction and remove it from options / IGNORE_OPTIONS 2014-06-03 11:33:51 -07:00
Aaron Patterson
2c32e94b89 always make :via a list 2014-06-03 11:33:51 -07:00
Aaron Patterson
6a3cbaca2e always pull out a via variable and simplify logic 2014-06-03 11:33:51 -07:00
Aaron Patterson
57d0da86b4 add a test for missing "via" parameter 2014-06-03 11:33:50 -07:00
Aaron Patterson
c91648b107 remove :as and :anchor from IGNORE_OPTIONS 2014-06-03 11:33:50 -07:00
Aaron Patterson
5491710934 remove another value from IGNORE_OPTIONS 2014-06-03 11:33:50 -07:00
Aaron Patterson
a04767d77c shorten up IGNORE_OPTIONS
since we are now passing the format value around, we can remove it from
the options hash, which means we don't need to consult as many values
from IGNORE_OPTIONS
2014-06-03 11:33:50 -07:00
Aaron Patterson
f28788b257 only look up the format option from the hash once 2014-06-03 11:33:50 -07:00
Aaron Patterson
74b73f132a Mapping never actually uses @set, so rm 2014-05-29 16:13:29 -07:00
Aaron Patterson
be137b0ac3 no reason to make a Mapper object if the path is blank 2014-05-29 16:08:56 -07:00
Aaron Patterson
da2cf937aa no more is_a checks on instantiation 2014-05-29 15:45:42 -07:00
Aaron Patterson
bb207ea7b6 Path::Pattern is instantiated internally, so make the contructor require a strexp object 2014-05-29 15:44:54 -07:00
Aaron Patterson
5682596db7 Strexp#names is only used in a test, so rm 2014-05-29 15:31:45 -07:00
Aaron Patterson
333a4d09ab pass the parsed path from mapper to the Strexp 2014-05-29 15:27:46 -07:00
Aaron Patterson
15ffbedf3b add an alternate constructor to Strexp that takes a string 2014-05-29 15:23:30 -07:00
Aaron Patterson
eabe504cdf ask the strexp for the ast 2014-05-29 15:16:40 -07:00
Aaron Patterson
7da98d0a59 remove dead code 2014-05-29 15:08:12 -07:00
Aaron Patterson
b3719d34d2 disconnect path from the instance 2014-05-29 15:05:22 -07:00
Aaron Patterson
ffbe1b18c2 reuse the ast we already made 2014-05-29 15:01:08 -07:00
Aaron Patterson
3a102a58f4 use a parser to extract the group parts from the path 2014-05-29 14:57:48 -07:00
Aaron Patterson
b5ea25bc44 pass the parsed parameters through the methods so we don't reparse or
require caching code
2014-05-29 14:44:56 -07:00
Aaron Patterson
295e912211 Merge branch 'master' into mapper
* master:
  Update url to rake docs [ci skip]
  Name#model_name doesn't return a String object
  Result sets never override a model's column type
  [ci skip] Make last note show up in postgresql guide.
  Add missing `:param` option from the docs for Mapper#match [ci skip] Option discovered by @zackperdue in #14741, implemented in #5581.
  Add @senny's changed from #14741, including code font for `resources` options, and wrapped to 80 chars. [ci skip]
  Use github url for homepage of log4r [ci skip]
  Remove TODO.
  Ensure we always use instances of the adapter specific column class
  Fix indentation from 1b4b26f [ci skip]
  [ci skip] Improve form_helpers.md guide.
  Clear inflections after test.
  Remove unnecessary include for integration tests.
  Added documentation for the :param option for resourceful routing
2014-05-29 10:56:33 -07:00
Aaron Patterson
8ed1a562c6 "controllers" should be a valid path name 2014-05-29 10:55:59 -07:00
Matthew Draper
29f8eae3fa Merge pull request #15061 from tgxworld/remove_unnecessary_include
Remove unnecessary include for integration tests.
2014-05-29 21:33:12 +09:30
Zachary Scott
3b606a3259 Add missing :param option from the docs for Mapper#match [ci skip]
Option discovered by @zackperdue in #14741, implemented in #5581.
2014-05-29 00:24:06 -07:00
Aaron Patterson
7e61a327ce controllers with slash names are also not supported, so we can reuse the message 2014-05-28 18:07:25 -07:00