aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge pull request #20080 from ↵Rafael Mendonça França2015-09-093-24/+3
| | | | | | | | | robertjlooby/fix_overwriting_by_dynamic_finders" This reverts commit d5ba9a42a6e93b163a49f99d739aa56820e044d0, reversing changes made to 30c503395bf6bf7db1ec0295bd661ce644628db5. Reason: This generate the dynalic finders more than one time
* Merge pull request #20080 from robertjlooby/fix_overwriting_by_dynamic_findersRafael Mendonça França2015-09-093-3/+24
|\ | | | | | | put dynamic matchers on GeneratedAssociationMethods instead of model
| * put dynamic matchers on the GeneratedAssociationMethods instead of modelRob Looby2015-05-083-3/+24
| |
* | Merge pull request #21554 from ronakjangir47/added_nodocRafael Mendonça França2015-09-091-1/+1
|\ \ | | | | | | Added nodoc tag for the methods which returns object of private apis
| * | Added nodoc for `arel` method which returns object of private api. [ci skip]Ronak Jangir2015-09-091-1/+1
| | |
* | | Merge pull request #20921 from pboling/fix-sql-colors-in-log-subscriberRafael Mendonça França2015-09-093-8/+126
|\ \ \ | | | | | | | | | | | | Fix and Improve sql logging coloration in `ActiveRecord::LogSubscriber`.
| * | | Remove extraneous `then` from case statementPeter Boling2015-07-172-14/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CR feedback from @egilburg Additionally - Move logic for colorizing the payload name into a separate method - Make some `ActiveRecord::LogSubscriber` instance methods private for clarity: - `colorize_payload_name` - `sql_color` - `logger` - Improve Changelog Documentation GH #20885
| * | | Improve sql logging coloration in `ActiveRecord::LogSubscriber`.Peter Boling2015-07-174-8/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Improves coloring for statements like: # Become WHITE SELECT * FROM ( SELECT * FROM mytable FOR UPDATE ) ss WHERE col1 = 5; LOCK TABLE table_name IN ACCESS EXCLUSIVE MODE; # Becomes RED ROLLBACK - Reinstates the coloration of the `payload[:name]`. Instead of simple alternating colors, adds meaning: - `MAGENTA` for `"SQL"` or `blank?` payload names - `CYAN` for Model Load/Exists - Introduces specs for sql coloration. - Introduces specs for payload name coloration. GH#20885
* | | | Merge pull request #21560 from ravindrakumawat/american-styleRafael Mendonça França2015-09-091-1/+1
|\ \ \ \ | | | | | | | | | | Rails documentation use american english.[ci skip]
| * | | | Rails documentation use american english.[ci skip]ravindra kumar kumawat2015-09-091-1/+1
|/ / / /
* | | | Merge pull request #21559 from claudiob/timestamp-docClaudio B.2015-09-081-5/+12
|\ \ \ \ | | | | | | | | | | Fix docs of AR::Timestamp to match #15726
| * | | | Fix docs of AR::Timestamp to match #15726claudiob2015-09-081-5/+12
|/ / / / | | | | | | | | | | | | | | | | | | | | [ci skip] @sgrif can you review when you have time? Thanks!
* | | | ensure that mutating headers will impact the content_type methodAaron Patterson2015-09-081-0/+5
| | | |
* | | | mime_type will always return a stringAaron Patterson2015-09-081-2/+1
| | | |
* | | | remove `parse_content_type` parameterAaron Patterson2015-09-081-6/+7
| | | | | | | | | | | | | | | | | | | | This method is specifically about the content type so lets remove the parameter.
* | | | avoid allocations when there is no content type setAaron Patterson2015-09-081-1/+2
| | | | | | | | | | | | | | | | | | | | create a singleton content type that just has nils, so that we don't have to allocate a content type object all the time.
* | | | handle implicit rendering correctlyAaron Patterson2015-09-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | If someone sets just a charset, but depends on the implicit type from rendering, this will store a strange content type header that looks like this: `; charset=blah`. This is so that when the content type header is parsed again, it will return nil for the actual type.
* | | | remove mime type lookups when parsing the content typeAaron Patterson2015-09-081-5/+5
| | | | | | | | | | | | | | | | | | | | It turns out that the response object never really cares what the mime type object is, so just use the string.
* | | | refactor content type settingAaron Patterson2015-09-081-44/+39
| | | | | | | | | | | | | | | | pull content-type setting to a private method to dry it up.
* | | | make Content-Type header the canonical location for content-type infoAaron Patterson2015-09-081-34/+50
| | | | | | | | | | | | | | | | | | | | Instead of storing content type information in an ivar and a header, lets move to just store the content type info in just the header.
* | | | pull content type parsing in to a methodAaron Patterson2015-09-081-7/+15
| | | | | | | | | | | | | | | | we'll use this method later to lazily parse content type headers.
* | | | ensure that content type defaults to text / html when setting charsetAaron Patterson2015-09-081-0/+7
| | | |
* | | | push content_type assigment in to metalAaron Patterson2015-09-083-9/+11
| | | | | | | | | | | | | | | | | | | | everything above metal really doesn't care about setting the content type, so lets rearrange these methods to be in metal.
* | | | avoid useless string allocationsAaron Patterson2015-09-082-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | _set_content_type only does something when there is a request object, otherwise the return value of _get_content_type is always ignored. This commit moves everything to the module that has access to the request object so we'll never to_s unless there is a reason
* | | | use accessors instead of manipulating the hashAaron Patterson2015-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | in the future I would like to make the header hash read only (or at least remove guarantees that mutations will do anything).
* | | | Merge pull request #21518 from codebaker95/activejob_logging_fixKasper Timm Hansen2015-09-082-1/+23
|\ \ \ \ | | | | | | | | | | Properly log nested parameters to Active Job
| * | | | Properly log nested parameters to Active JobMarek Pieczyk2015-09-082-1/+23
|/ / / / | | | | | | | | | | | | Refactor arguments logging method for Active Job
* | | | Merge pull request #21556 from artofhuman/masterRafael Mendonça França2015-09-081-4/+4
|\ \ \ \ | | | | | | | | | | Fix typo in activemodel changelog [ci skip]
| * | | | Fix typo in activemodel changelogSemyon Pupkov2015-09-081-4/+4
| | | | |
* | | | | Push key_generator into SerializedCookieJarsKasper Timm Hansen2015-09-081-4/+4
| | | | | | | | | | | | | | | | | | | | It's only used there.
* | | | | Move the request method in to the AbstractCookieJarKasper Timm Hansen2015-09-081-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | `CookieJar` is only at the start of the chain and has its own request method, so we don't need it in the module.
* | | | | Pull up parse to the legacy upgrading moduleKasper Timm Hansen2015-09-081-10/+5
| | | | | | | | | | | | | | | | | | | | It was the same in both legacy versions of the signed and encrypted cookie jars.
* | | | | Call super to remove the decrypt_and_verify methodKasper Timm Hansen2015-09-081-8/+4
| | | | | | | | | | | | | | | | | | | | The `EncryptedCookieJar` already calls it for us, so just delegate to its `parse` implementation.
* | | | | Call super to remove the verify methodKasper Timm Hansen2015-09-081-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | `SignedCookieJar`'s parse method already attempts to verify the message, so we can just call super and try the old verifier if it fails.
* | | | | Add parse method to share deserialization logic.Kasper Timm Hansen2015-09-081-19/+12
| | | | | | | | | | | | | | | | | | | | Cuts down on the duplicated reading parts.
* | | | | Add commit in the EncryptedCookieJarKasper Timm Hansen2015-09-081-17/+7
| | | | | | | | | | | | | | | | | | | | Gets rid of the option parsing and makes what the encryptor does stand out.
* | | | | Use commit in the SignedCookieJarKasper Timm Hansen2015-09-081-15/+6
| | | | | | | | | | | | | | | | | | | | Lets us avoid worrying about parsing the options and doing just what we need.
* | | | | Add commit method to share option normalizationKasper Timm Hansen2015-09-081-4/+12
| | | | | | | | | | | | | | | | | | | | Remove the clutter to make PermanentCookieJar's one change stand out.
* | | | | Add AbstractCookieJar class.Kasper Timm Hansen2015-09-081-1/+3
|/ / / / | | | | | | | | | | | | Eventually this will be the superclass of all the chained jars.
* | | | Use released mysql2Rafael Mendonça França2015-09-082-8/+3
| | | |
* | | | Merge pull request #21502 from ↵Rafael Mendonça França2015-09-086-3/+47
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | bernerdschaefer/bs-polymorphic-url_for-dups-arguments `url_for` does not modify polymorphic options
| * | | | `url_for` does not modify polymorphic optionsBernerd Schaefer2015-09-046-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `url_for` methods in `actionpack` and `actionview` now make a copy of the provided options before generating polymorphic paths or URLs. The bug in the previous behavior is most noticeable in a case like: url_options = [:new, :post, param: 'value'] if current_page?(url_options) css_class = "active" end link_to "New Post", url_options, class: css_class
* | | | | Merge pull request #21552 from ronakjangir47/fixed_docsRichard Schneeman2015-09-081-1/+1
|\ \ \ \ \ | | |_|/ / | |/| | | Fixed Time conversion example for UTC time zone [ci skip]
| * | | | Fixed Time conversion example for UTC time zone [ci skip]Ronak Jangir2015-09-081-1/+1
| | | | |
* | | | | Merge pull request #21535 from dmitry/feature/validate-multiple-contextsRafael Mendonça França2015-09-085-2/+50
|\ \ \ \ \ | | | | | | | | | | | | Validate multiple contexts on `valid?` and `invalid?` at once
| * | | | | Validate multiple contexts on `valid?` and `invalid?` at once.Dmitry Polushkin2015-09-075-2/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Example: ```ruby class Person include ActiveModel::Validations attr_reader :name, :title validates_presence_of :name, on: :create validates_presence_of :title, on: :update end person = Person.new person.valid?([:create, :update]) # => true person.errors.messages # => {:name=>["can't be blank"], :title=>["can't be blank"]} ```
* | | | | | Merge pull request #21512 from X0nic/guides-clarify-timeout-errorYves Senn2015-09-081-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | [Rails Guides] clarify `ActiveRecord::ConnectionTimeoutError`
| * | | | | [Rails Guides] clarify `ActiveRecord::ConnectionTimeoutError`Nathan Lee2015-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Original: * ActiveRecord::ConnectionTimeoutError - could not obtain a database connection within 5 seconds. The max pool size is currently 5; consider increasing it: Modified version: * ActiveRecord::ConnectionTimeoutError - could not obtain a database connection within 5.000 seconds (waited 5.000 seconds) [ci skip]
* | | | | | Merge pull request #21511 from rwz/ar-exceptions-no-argsEileen M. Uchitelle2015-09-085-66/+178
|\ \ \ \ \ \ | | | | | | | | | | | | | | Removes mandatory arguments from AR exceptions
| * | | | | | Make ActiveRecordException descendants args optionalPavel Pravosud2015-09-075-66/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change allows to instantiate all ActiveRecordError descendant execption classes without arguments, which might be useful in testing and is far less surprising than mandatory arguments.