aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #21726 from yui-knk/test/named_bind_aritySean Griffin2015-09-221-3/+9
|\ | | | | Add tests for sanitize named bind arity
| * Add tests for sanitize named bind arityyui-knk2015-09-231-3/+9
|/
* ask the request object for the sessionAaron Patterson2015-09-221-1/+1
| | | | | The flash middleware shouldn't know how to look up the session object. Just ask the request for that information.
* don't deal with `nil` valuesAaron Patterson2015-09-222-1/+7
| | | | | We can know whether or not there is a content type object, and just exit early. There is no need to `try` so hard.
* Merge pull request #21722 from ronakjangir47/test_delivery_methodsYves Senn2015-09-221-2/+4
|\ | | | | Added assertion for error messages for nil and unknown delivery methods
| * Added assertion for error messages for nil and unknown delivery methodsRonak Jangir2015-09-221-2/+4
| | | | | | As `deliver_now` `RuntimeError` for both nil & unknown delivery method so it’s good to have assertion for error messages
* | Merge pull request #21715 from rails/introduce_data_sourcesYves Senn2015-09-2216-34/+108
|\ \ | | | | | | introduce `conn.data_source_exists?` and `conn.data_sources`.
| * | introduce `conn.data_source_exists?` and `conn.data_sources`.Yves Senn2015-09-2216-34/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These new methods are used from the Active Record model layer to determine which relations are viable to back a model. These new methods allow us to change `conn.tables` in the future to only return tables and no views. Same for `conn.table_exists?`. The goal is to provide the following introspection methods on the connection: * `tables` * `table_exists?` * `views` * `view_exists?` * `data_sources` (views + tables) * `data_source_exists?` (views + tables)
* | | Merge pull request #21718 from thiagoaugusto/patch-4Rafael Mendonça França2015-09-221-2/+2
|\ \ \ | | | | | | | | Update i18n.md [ci skip]
| * | | Update i18n.md [ci skip]Thiago Augusto2015-09-221-2/+2
|/ / /
* | | Remove unneeded generator variable.Kasper Timm Hansen2015-09-221-1/+0
| | |
* | | Merge pull request #21356 from ronakjangir47/remove_mocha_railtiesKasper Timm Hansen2015-09-222-15/+35
|\ \ \ | | | | | | | | Removed mocha from Railites PluginGeneratorTest
| * | | Removed mocha from Railites PluginGeneratorTestRonak Jangir2015-09-222-15/+35
| | | |
* | | | tests, use `if_exists: true` instead of `rescue nil`.Yves Senn2015-09-221-1/+1
| | | |
* | | | AMo typosAkira Matsuda2015-09-222-3/+3
|/ / /
* | | Merge pull request #21714 from thiagoaugusto/patch-2Richard Schneeman2015-09-221-2/+2
|\ \ \ | |/ / |/| | Update routing.md
| * | Update routing.mdThiago Augusto2015-09-221-2/+2
|/ /
* | fix `bin/test -a sqlite3_mem`.Yves Senn2015-09-221-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | Merge pull request #20569 from theSteveMitchell/masterYves Senn2015-09-223-15/+31
|\ \ | | | | | | | | | Check mysql structure_load for errors
| * | Check response of structure_load for mysql_database_tasks and make ↵Steve Mitchell2015-09-182-12/+35
| | | | | | | | | | | | structure_dump consistent
* | | Merge pull request #21712 from amitsuroliya/html_fixYves Senn2015-09-221-2/+2
|\ \ \ | | | | | | | | Correcting output of `file_field` with `multiple` attribute option [ci skip]
| * | | Correcting output of `file_field` with `multiple` attribute option [ci skip]amitkumarsuroliya2015-09-221-2/+2
| | | |
* | | | Merge pull request #21678 from ronakjangir47/array_to_formatted_s_docsYves Senn2015-09-221-1/+3
|\ \ \ \ | | | | | | | | | | Added Examples in docs for internal behavior of Array#to_formatted_s [ci skip]
| * | | | Added Examples in docs for internal behavior of Array#to_formatted_s [ci skip]Ronak Jangir2015-09-191-1/+3
| | | | |
* | | | | Merge pull request #21710 from amitsuroliya/correct_resultClaudio B.2015-09-212-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Correcting output of `number_to_percentage` example in `number_helper…
| * | | | | Correcting output of `number_to_percentage` example in `number_helper` [ci skip]amitkumarsuroliya2015-09-222-2/+2
| | |/ / / | |/| | | | | | | | Here is correct output of `number_to_percentage(100, format: "%n %”)`
* | | | | Merge pull request #21711 from JuanitoFatas/doc/typo-1Robin Dupret2015-09-221-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | Fix a typo: Mime::Types should be Mime::Type [ci skip]
| * | | | Fix a typo: Mime::Types should be Mime::Type [ci skip]Juanito Fatas2015-09-221-1/+1
|/ / / /
* | | | Merge pull request #21703 from ronakjangir47/redirect_error_messagesJeremy Daer2015-09-211-2/+4
|\ \ \ \ | | | | | | | | | | Added assertion for error messages for redirection to nil and params
| * | | | Added assertion for error messages for redirection to nil and params Ronak Jangir2015-09-211-2/+4
| | | | | | | | | | | | | | | As both `redirect_to_nil` and `redirect_to_params` are raising same `ActionController::ActionControllerError` so it’s good to assert error messages as well
* | | | | drop array allocations on Mime::Type#=~Aaron Patterson2015-09-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Synonyms are always a list of strings, and we have access to the internal string representation, so we can avoid allocating new arrays.
* | | | | remove another `blank?` callAaron Patterson2015-09-211-1/+1
| | | | |
* | | | | remove html_types setAaron Patterson2015-09-212-7/+3
| | | | | | | | | | | | | | | | | | | | Now that `all` has it's own object, we don't need the html_types Set.
* | | | | compare arrays not set objects.Aaron Patterson2015-09-211-3/+3
| | | | |
* | | | | introduce an `All` mime typeAaron Patterson2015-09-213-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | This class gives us the `all?` predicate method that returns true without hitting method missing
* | | | | remove `blank?` calls on `==`Aaron Patterson2015-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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?`.
* | | | | change inheritance to compositionAaron Patterson2015-09-212-16/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | update changelog for mime changesAaron Patterson2015-09-211-0/+13
| | | | |
* | | | | swap upcase and to_symAaron Patterson2015-09-211-1/+1
| | | | |
* | | | | stop calling deprecated methodsAaron Patterson2015-09-2122-93/+93
| | | | | | | | | | | | | | | | | | | | | | | | | We should be asking the mime type method for the mime objects rather than via const lookup
* | | | | deprecate accessing mime types via constantsAaron Patterson2015-09-214-42/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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]
* | | | | cache the new type object on the stackAaron Patterson2015-09-211-2/+2
| | | | | | | | | | | | | | | | | | | | Now we don't have to look it up with a `const_get`.
* | | | | Merge pull request #21704 from ronakjangir47/eliminate_testsAndrew White2015-09-211-8/+0
|\ \ \ \ \ | |_|_|_|/ |/| | | | Eliminate `test_tables_quoting` following seems to be left in #21687
| * | | | Eliminate `test_tables_quoting` following seems to be left in #21687Ronak Jangir2015-09-211-8/+0
|/ / / /
* | | | Skip the test added in 9cc324a on buggy versions of SQliteSean Griffin2015-09-212-17/+22
| | | | | | | | | | | | | | | | See 7dcfc25e7c52682a4343c2ba7188a69e7c06c936 for more details
* | | | Ensure aliased attributes passed to `select` are quoted if using `from`Sean Griffin2015-09-214-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #21488 [Sean Griffin & johanlunds]
* | | | Fix another implicit dependency of the AM test suiteSean Griffin2015-09-211-0/+1
| | | | | | | | | | | | | | | | Hopefully this is the last one
* | | | Require dependencies from stdlib in the Decimal typeSean Griffin2015-09-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | We still need the `Helpers` constant in the `ActiveRecord` namespaceSean Griffin2015-09-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | Remove no-op options being passed in AM type registrationsSean Griffin2015-09-211-11/+11
|/ / / | | | | | | | | | | | | | | | 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.