- 22 9月, 2015 37 次提交
-
-
由 Yves Senn 提交于
We should not run MysqlAdapter tests when running with `sqlite3_mem`. This also moves the test-case outside the MysqlAdapter namespace. This will prevent the following error when running everything: ``` 1) Error: TestAdapterWithInvalidConnection#test_inspect_on_Model_class_does_not_raise: TypeError: superclass mismatch for class MysqlAdapter ```
-
由 Yves Senn 提交于
Check mysql structure_load for errors
-
由 Yves Senn 提交于
Correcting output of `file_field` with `multiple` attribute option [ci skip]
-
由 amitkumarsuroliya 提交于
-
由 Yves Senn 提交于
Added Examples in docs for internal behavior of Array#to_formatted_s [ci skip]
-
由 Claudio B. 提交于
Correcting output of `number_to_percentage` example in `number_helper…
-
由 Robin Dupret 提交于
Fix a typo: Mime::Types should be Mime::Type [ci skip]
-
由 amitkumarsuroliya 提交于
Here is correct output of `number_to_percentage(100, format: "%n %”)`
-
由 Juanito Fatas 提交于
-
由 Jeremy Daer 提交于
Added assertion for error messages for redirection to nil and params
-
由 Aaron Patterson 提交于
Synonyms are always a list of strings, and we have access to the internal string representation, so we can avoid allocating new arrays.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
Now that `all` has it's own object, we don't need the html_types Set.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
This class gives us the `all?` predicate method that returns true without hitting method missing
-
由 Aaron Patterson 提交于
Since Mime::Type implements `method_missing`, and `blank?` triggers it's positive branch: https://github.com/rails/rails/blob/f9dda1567ea8d5b27bd9d66ac5a8b43dc67a6b7e/actionpack/lib/action_dispatch/http/mime_type.rb#L342 We should stop calling `blank?`.
-
由 Aaron Patterson 提交于
Changes `Mimes` to compose a set rather than inherit from array. With this change we don't need to define as many methods, so ISEQ memory is saved. Also it is clear which methods break the set cache.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
We should be asking the mime type method for the mime objects rather than via const lookup
-
由 Aaron Patterson 提交于
We don't want to manage a list of constants on `Mime::`. Managing constants is strange because it will break method caches, not to mention looking up by a constant could cause troubles. For example suppose there is a top level constant `HTML`, but nobody registers the HTML mime type and someone accesses `Mime::HTML`. Instead of getting an error about how the mime type doesn't exist, instead you'll get the top level constant. So, instead of directly accessing the constants, change this: Mime::HTML To this: Mime::Type[:HTML]
-
由 Aaron Patterson 提交于
Now we don't have to look it up with a `const_get`.
-
由 Andrew White 提交于
Eliminate `test_tables_quoting` following seems to be left in #21687
-
由 Ronak Jangir 提交于
-
由 Sean Griffin 提交于
See 7dcfc25e7c52682a4343c2ba7188a69e7c06c936 for more details
-
由 Sean Griffin 提交于
Fixes #21488 [Sean Griffin & johanlunds]
-
由 Sean Griffin 提交于
Hopefully this is the last one
-
由 Sean Griffin 提交于
In Active Record, it appears these were either autoloaded, which actually was likely due to test ordering since the method `Float#to_d` wouldn't trigger it. This makes it explicit, and unlikely to fail in the future.
-
由 Ronak Jangir 提交于
As both `redirect_to_nil` and `redirect_to_params` are raising same `ActionController::ActionControllerError` so it’s good to assert error messages as well
-
由 Sean Griffin 提交于
We should probably review the usage of these constants and decide whether we want to be more transparent about which things come from Active Model vs Active Record, as this is meaningful information as to whether there is database specific behavior or not.
-
由 Sean Griffin 提交于
The `override` option is only a thing for Active Record registrations. We should figure out how to make this properly error out without doing anything too weird to the code.
-
由 Sean Griffin 提交于
Move ActiveRecord::Type to ActiveModel The intention has always been to move the attributes API off of Active Record and onto Active Model. This is the first step in that transition. This merges the pull request (which has been squashed and rebased), with various changes to the code to get the quality to a level which is acceptable to merge. Close #21533
-
由 Sean Griffin 提交于
Any tests for a type which is not overridden by Active Record, and does not test the specifics of the attributes API interacting in more complex ways have no reason to be in the Active Record suite. Doing this revealed that the implementation of the date and time types in AM was actually completely broken, and incapable of returning any value other than `nil`.
-
由 Sean Griffin 提交于
Things like decorations, overrides, and priorities only matter for Active Record, so the Active Model registry can be implemented much more simply. At this point, I wonder if having Active Record's registry inherit from Active Model's is even worth the trouble? The Active Model class was also missing test cases, which have been backfilled. This removes the error when two types are registered with the same name, but given that Active Model is meant to be significantly more generic, I do not think this is an issue for now. If we want, we can raise an error at the point that someone tries to register it.
-
由 Sean Griffin 提交于
We do not need to require each file from AM individually, the type module does that for us. Even if the classes are extremely small right now, I'd rather keep any custom classes needed by AR in their own files, as they can easily have more complex changes in the future.
-
由 Sean Griffin 提交于
These are used by the connection adapters to convert SQL type information into the appropriate type object, and makes no sense outside of the context of Active Record
-
由 Kir Shatrov 提交于
The first step of bringing typecasting to ActiveModel
-
- 21 9月, 2015 3 次提交
-
-
由 Sean Griffin 提交于
Removed unused parameter `options` for `register_detail` method
-
由 Andrew White 提交于
-
由 Andrew White 提交于
The INITIAL_WAIT constant has moved to the Sidekiq::Poller class but rather than setting the constant directly we can override it via the `:poll_interval_average` option. This was causing random build failures because the test was waiting for 10 seconds for the job to execute but the initial wait was a random value between 10 and 15 seconds.
-