- 07 2月, 2015 14 次提交
-
-
由 Rafael Mendonça França 提交于
nil or false should not be valid argument to the merge method. Closes #12264
-
由 Rafael Mendonça França 提交于
Relation#merge checks if the argument is an array and the only possible returns of build_default_scope is nil or a Relation. Doing this we can raise an ArgumentError when Relation#merge receive a nil value.
-
由 Rafael Mendonça França 提交于
Add an `:only` option to `perform_enqueued_jobs` to filter jobs based on type.
-
由 Michael Ryan 提交于
type. This allows specific jobs to be tested, while preventing others from being performed unnecessarily. Example: def test_hello_job assert_performed_jobs 1, only: HelloJob do HelloJob.perform_later('jeremy') LoggingJob.perform_later end end An array may also be specified, to support testing multiple jobs. Example: def test_hello_and_logging_jobs assert_nothing_raised do assert_performed_jobs 2, only: [HelloJob, LoggingJob] do HelloJob.perform_later('jeremy') LoggingJob.perform_later('stewie') RescueJob.perform_later('david') end end end Fixes #18802. Trim space and document :only option.
-
由 Sean Griffin 提交于
The `&block` form is more than twice as fast as the manual form of delegation (and is the code I'd rather write anyway). Unfortunately, it's still twice as slow on MRI. However, this is enough of a hotspot to justify giving JRuby special treatment. I can't currently provide benchmarks in the context of Active Record, since the JDBC adapters still aren't updated for 4.2, but the actual work performed (assuming it's been read at least once already) will have nearly the same performance characteristics as https://gist.github.com/sgrif/b86832786551aaee74de.
-
由 Rafael Mendonça França 提交于
We already validate the keys, so it is better to use the built-in feature to do this
-
由 Sean Griffin 提交于
The same is not true of `define_attribute`, which is meant to be the low level no-magic API that sits underneath. The differences between the two APIs are: - `attribute` - Lazy (the attribute will be defined after the schema has loaded) - Allows either a type object or a symbol - `define_attribute` - Runs immediately (might get trampled by schema loading) - Requires a type object This was the last blocker in terms of public interface requirements originally discussed for this feature back in May. All the implementation blockers have been cleared, so this feature is probably ready for release (pending one more look-over by me).
-
由 Rafael Mendonça França 提交于
Merge #12067 rebasing and improving the code.
-
由 Rafael Mendonça França 提交于
Enable number_to_percentage to keep the number's precision by allowing :precision option value to be nil Conflicts: activesupport/CHANGELOG.md activesupport/lib/active_support/number_helper.rb activesupport/test/number_helper_test.rb
-
由 Rafael Mendonça França 提交于
Indicate link_to creates an anchor element
-
由 Colin Rymer 提交于
The `link_to` helper generates an HTML anchor element (consisting of opening and closing anchor tags and an element body). The docs currently state the a link tag is generated (which would indicate a tag like `<link>`, which is another valid HTML tag), so this change clarifies that an anchor element is actually generated. [ci skip]
-
由 Sean Griffin 提交于
This reverts commit 9c47b874.
-
由 Sean Griffin 提交于
These are (potentially, depending on input) called in several places in both the router, and Active Record. The code also becomes much cleaner. This results in ~33% performance gain in both methods. Calculating ------------------------------------- before 15.696k i/100ms after 19.865k i/100ms ------------------------------------------------- before 303.064k (± 2.6%) i/s - 1.523M after 446.734k (± 2.4%) i/s - 2.245M On Ruby 2.2, a warning will be emitted about states not being copied, because we're calling `super` from a subclass. We can safely ignore it, however, since we're converting the result back into a HWIDA
-
由 Rafael Mendonça França 提交于
Amended json_escape comments
-
- 06 2月, 2015 26 次提交
-
-
由 Rafael Mendonça França 提交于
Better docs for AM::Lint::Tests
-
由 Xavier Noria 提交于
The existing example seems somewhat forced: is it realistic to have a model that accepts state in its initializer but considers it has not been changed? By allowing state changes to happen only via accessors it seems more natural that new instances are considered to be unchanged (as they are in AR). [ci skip]
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
-
由 Rafael Mendonça França 提交于
Use SCHEMA instead of DB_STRUCTURE for specifiying structure file. Conflicts: activerecord/CHANGELOG.md
-
由 Rafael Mendonça França 提交于
Fix `test_types_line_up` when column type missing
-
由 Rafael Mendonça França 提交于
Extracted silence_stream method to new module in activesupport/testing
-
由 Rafael Mendonça França 提交于
Migrating xhr methods to keyword arguments syntax
-
由 Rafael Mendonça França 提交于
Also remove the default value since it will be always passed and Array(nil) returns an empty array
-
由 Rafael Mendonça França 提交于
Rename AS::Callback#merge
-
由 Rafael Mendonça França 提交于
This will make rake test_sqlite3_mem work again
-
由 Rafael Mendonça França 提交于
They are implementation details
-
由 Rafael Mendonça França 提交于
Deprecated finders are not supported anymore
-
由 Rafael Mendonça França 提交于
Closes #18646
-
由 Rafael Mendonça França 提交于
call is too generic
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
Thse methods are used only inside this class
-
由 Rafael Mendonça França 提交于
-
由 Andrew White 提交于
Thor isn't very discerning over whether some content is present when passed to `inject_into_file`, e.g. a commented out route is detected as being present. So to prevent people scratching their heads as to why a route hasn't appeared it's better to fall on the side of having duplicate routes.
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
-
由 Rafael Mendonça França 提交于
The `model_name` method should be called on `to_model`
-
由 Akira Matsuda 提交于
because the partial renderer would not create an lvar per each template since c67005f2
-
由 Akira Matsuda 提交于
config_accessor should better not be a public method, as with Ruby's attr_accessor
-
由 Akira Matsuda 提交于
-