Commit Graph

42114 Commits

Author SHA1 Message Date
Rafael Mendonça França
c82dbc6a1c Fix to_query with empty arrays too 2014-02-06 01:03:41 -02:00
Rafael Mendonça França
7aa4b7dc6b Add CHANGELOG entry
Closes #13909
2014-02-05 23:55:50 -02:00
Rafael Mendonça França
ab51b285e2 Refatoring the method to avoid shot-circuit return 2014-02-05 23:55:17 -02:00
Rafael Mendonça França
d6e3fd775b Test with a blank value 2014-02-05 23:47:16 -02:00
Rafael Mendonça França
88b064dfae Move test to the right file 2014-02-05 23:42:43 -02:00
Hincu Petru
326e652749 Fixed "Hash#to_param confused by empty hash values #13892" 2014-02-05 23:31:50 -02:00
Rafael Mendonça França
6cc3afb00a Merge pull request #13953 from seanwalbran/fix-humanize-match-reference
fix interplay of humanize and html_escape
2014-02-05 23:07:01 -02:00
Sean Walbran
26698fb91d fix interplay of humanize and html_escape 2014-02-05 17:19:51 -06:00
Rafael Mendonça França
84fe7b7db6 Merge pull request #13938 from marcandre/sized_enumerator
Sized enumerator
2014-02-05 20:10:45 -02:00
Marc-Andre Lafortune
a476020567 Return sized enumerator from Enumerable#index_by 2014-02-05 16:53:58 -05:00
Marc-Andre Lafortune
13d2696c10 Return sized enumerator from Batches#find_each 2014-02-05 16:53:02 -05:00
Marc-Andre Lafortune
d37f395be8 Return sized enumerator from Batches#find_in_batches 2014-02-05 16:49:29 -05:00
Marc-Andre Lafortune
4499ab5fde Strengthen test with different nb of rows and columns 2014-02-05 16:45:56 -05:00
Marc-Andre Lafortune
39b2cc1900 Remove obsolete test (builtin group_by is now used) 2014-02-05 16:45:55 -05:00
Marc-Andre Lafortune
4c3e11d30a Remove obsolete line (was needed for Ruby 1.8.7 support) 2014-02-05 16:45:55 -05:00
Yves Senn
1df4dcf7dd remove gemnasium batch from README. [ci skip]
The rails/rails gemnasium page (https://gemnasium.com/rails/rails) is not helping much.
It lists 0 dependencies so there is not much to track. Also our gems mostly depend
on other gems we control. There is not much point in monitoring them.

The batch was introduced with #3909.
2014-02-05 15:18:47 +01:00
Arun Agrawal
10867a77be Removed unused commented code [ci skip]
As discussed in #13940 this can be removed
We can document this somewhere else in testing guides.
2014-02-05 11:14:24 +01:00
Arun Agrawal
069a010277 Merge pull request #13950 from calvintam/fix_typos
Fixed typos
2014-02-05 10:41:01 +01:00
Calvin Tam
128fa3b9a4 Fixed typos [ci skip] 2014-02-05 20:37:26 +11:00
Yves Senn
132834bc6a Merge pull request #13949 from vajrasky/fix_typo_column_definition_test
Fixed typos in column_definition_test.rb.
2014-02-05 10:14:00 +01:00
Vajrasky Kok
38777949f0 Fixed typo in column_definition_test.rb. 2014-02-05 16:51:34 +08:00
Yves Senn
3ba0eeda02 docs, AR already auto-detects primary keys. Closes #13946. [ci skip]
This behavior was introduced since Rails 3.1 (207f266ccaaa9cd04cd2a7513ae5598c4358b510)
but the docs were still out of date.
2014-02-05 08:52:59 +01:00
Rafael Mendonça França
f92142dce1 Document that enum conditions must use the ordinal value
[ci skip]
2014-02-04 15:27:57 -02:00
Rafael Mendonça França
90794325cf Merge pull request #13943 from loganhasson/master
[ci skip] Add missing 'task' to note on Running Migrations
2014-02-04 08:45:28 -08:00
Logan Hasson
e9bfa28b1a [ci skip] Add missing 'task' to note on Running Migrations 2014-02-04 11:43:26 -05:00
Rafael Mendonça França
404cb36ee3 Add CHANGELOG entry for #13935 [ci skip] 2014-02-04 12:13:14 -02:00
Rafael Mendonça França
f1a6307a94 Merge pull request #13935 from arthurnn/fix_12566
Make sure transaction state resets after commit
2014-02-04 06:03:14 -08:00
Arun Agrawal
75510a62f1 Merge pull request #13940 from gregmolnar/guides
add missing sharp [ci skip]
2014-02-04 04:58:04 -08:00
Greg Molnar
d3edf1ea82 add missing sharp [ci skip] 2014-02-04 13:54:22 +01:00
Yves Senn
c7abc516f8 docs, link MySQL manual for multi column indexes. [ci ckip].
Closes #9131.
2014-02-04 13:38:48 +01:00
Rafael Mendonça França
702e0e1a6b Merge pull request #13899 from Fortisque/kevin/active_record_HABTM_with_belongs_to
destruction errors out on HABTM w/out primary key
2014-02-04 04:11:46 -08:00
Yves Senn
7d196cf360 #to_param returns nil if to_key returns nil. Closes #11399.
The documentation of `#to_key` (http://api.rubyonrails.org/classes/ActiveModel/Conversion.html#method-i-to_key)
states that it returns `nil` if there are no key attributes. `to_param` needs
to be aware of that fact and return `nil` as well.

Previously it raised the following exception:

```
  1) Error:
ConversionTest#test_to_param_returns_nil_if_to_key_is_nil:
NoMethodError: undefined method `join' for nil:NilClass
    /Users/senny/Projects/rails/activemodel/lib/active_model/conversion.rb:65:in `to_param'
    /Users/senny/Projects/rails/activemodel/test/cases/conversion_test.rb:34:in `block in <class:ConversionTest>'
```
2014-02-04 10:27:46 +01:00
Guillermo Iguaran
a5dd1d2490 Merge pull request #13936 from edogawaconan/fix_docs
Missing closing parenthesis. [ci skip]
2014-02-03 19:20:52 -08:00
edogawaconan
b10f45ce75 Missing closing parenthesis. 2014-02-04 11:46:59 +09:00
Arthur Neves
9b66d6d47f Make sure transaction state resets after commit
[fixes #12566]
2014-02-03 15:49:48 -05:00
Yves Senn
28abd967fc Merge pull request #11770 from timruffles/doc_ajax_xhr
be more specific about csrf token and ajax - not whitelisted outside of jquery-rails [ci skip]
2014-02-03 08:38:44 -08:00
Yves Senn
dd493d3b6f docs, be clear that options is a hash. Closes #11904. [ci skip]. 2014-02-03 16:42:02 +01:00
Yves Senn
06dde5fbf5 some wording format changes. [ci skip] 2014-02-03 14:52:01 +01:00
Yves Senn
584a46479b pass habtm :autosave to underlying hm:t association. Closes #13923. 2014-02-03 14:48:59 +01:00
Yves Senn
b7c7cb1a63 docs, revisit polymorphic associations with STI example. [ci skip]
This is a follow up to #13926.

/cc @fxn
2014-02-03 13:38:14 +01:00
Yves Senn
c46b0d1023 docs, reference to ruby-lang.org. refs #13492. [ci skip] 2014-02-03 12:01:32 +01:00
Yves Senn
67d4dc2bdb rails_guides/helpers.rb requires YAML to run.
Resolve the following error when running `bundle exec rake guides:generate:html`:

```
/Users/senny/.rbenv/versions/2.0.0-p353/bin/ruby rails_guides.rb
Generating 2_2_release_notes.md as 2_2_release_notes.html
/Users/senny/Projects/rails/guides/rails_guides/helpers.rb:17:in `documents_by_section': uninitialized constant RailsGuides::Helpers::YAML (ActionView::Template::Error)
	from /Users/senny/Projects/rails/guides/rails_guides/helpers.rb:32:in `docs_for_menu'
	from /Users/senny/Projects/rails/guides/source/layout.html.erb:56:in `block in ___sers_senny__rojects_rails_guides_source_layout_html_erb___3094858039481335962_70118647133480'
	from /Users/senny/Projects/rails/guides/source/layout.html.erb:54:in `each'
	from /Users/senny/Projects/rails/guides/source/layout.html.erb:54:in `___sers_senny__rojects_rails_guides_source_layout_html_erb___3094858039481335962_70118647133480'
	from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:143:in `block in render'
	from /Users/senny/Projects/rails/activesupport/lib/active_support/notifications.rb:161:in `instrument'
	from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:337:in `instrument'
	from /Users/senny/Projects/rails/actionview/lib/action_view/template.rb:141:in `render'
	from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
	from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:47:in `render_template'
	from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/template_renderer.rb:17:in `render'
	from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/renderer.rb:42:in `render_template'
	from /Users/senny/Projects/rails/actionview/lib/action_view/renderer/renderer.rb:23:in `render'
	from /Users/senny/Projects/rails/actionview/lib/action_view/helpers/rendering_helper.rb:24:in `render'
	from /Users/senny/Projects/rails/guides/rails_guides/markdown.rb:160:in `render_page'
	from /Users/senny/Projects/rails/guides/rails_guides/markdown.rb:25:in `render'
	from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:205:in `block in generate_guide'
	from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:195:in `open'
	from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:195:in `generate_guide'
	from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:144:in `block in generate_guides'
	from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:142:in `each'
	from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:142:in `generate_guides'
	from /Users/senny/Projects/rails/guides/rails_guides/generator.rb:97:in `generate'
	from rails_guides.rb:63:in `<main>'
rake aborted!
Command failed with status (1): [/Users/senny/.rbenv/versions/2.0.0-p353/bi...]
/Users/senny/Projects/rails/guides/Rakefile:11:in `block (3 levels) in <top (required)>'
Tasks: TOP => guides:generate:html
(See full trace by running task with --trace)
```
2014-02-03 12:01:32 +01:00
Arun Agrawal
9321d678e4 Merge pull request #13930 from calvintam/master
Fixed minor typo [ci skip]
2014-02-03 02:16:11 -08:00
Calvin Tam
8f0460d746 Fixed minor typo [ci skip] 2014-02-03 21:09:29 +11:00
Yves Senn
7f8fbf7744 Merge pull request #13926 from fredwu/doc_polymorphic_sti_var_name_typo
Fixes the camelCase variable name in the docs [ci skip]
2014-02-02 23:25:44 -08:00
Fred Wu
ca1121af6a Fixes the camelCase variable name in the docs [ci skip] 2014-02-03 12:02:07 +11:00
Kevin Casey
00ebbb7945 fix HABTM w/out primary key errors on destruction 2014-02-02 11:47:06 -08:00
Rafael Mendonça França
3e6d302ccc Merge pull request #13924 from adomokos/adding_path_examples_to_button_to_tests
Adding a documentation example and a test to button_to with path
2014-02-02 08:30:35 -08:00
Attila Domokos
4b4db54e6b Adding an documentation example and a test to button_to with path
I did not see in the docs that `button_to` supports not only URLs but paths as well. I documented this functionality with a unit tests and added an example to the docs as well.
2014-02-02 10:27:18 -06:00
Rafael Mendonça França
4ac114471c Assert the file is deprecated 2014-02-01 18:29:53 -02:00