Commit Graph

53751 Commits

Author SHA1 Message Date
Ryuta Kamizono
d39b6f77fc Add stored procedure test in mysql2 2015-10-15 13:18:21 +09:00
Ryuta Kamizono
d9e74ace9f Make AbstractMysqlAdapter#version public 2015-10-15 07:18:55 +09:00
Arthur Nogueira Neves
3ad381c3f8 Merge pull request #21961 from Gaurav2728/migration_class_methods_nodoc
migrations Class methods have nodoc, fix it for API [ci skip]
2015-10-14 14:18:23 -04:00
Gaurav Sharma
d68514c168 migrations Class methods have nodoc, fix it for API [ci skip] 2015-10-14 23:44:12 +05:30
Yves Senn
428d47adfe applies new doc guidelines to Active Record.
The focus of this change is to make the API more accessible.
References to method and classes should be linked to make it easy to
navigate around.

This patch makes exzessiv use of `rdoc-ref:` to provide more readable
docs. This makes it possible to document `ActiveRecord::Base#save` even
though the method is within a separate module
`ActiveRecord::Persistence`. The goal here is to bring the API closer to
the actual code that you would write.

This commit only deals with Active Record. The other gems will be
updated accordingly but in different commits. The pass through Active
Record is not completely finished yet. A follow up commit will change
the spots I haven't yet had the time to update.

/cc @fxn
2015-10-14 17:40:00 +02:00
Yves Senn
809fd2b273 fix RDoc markup in ConnectionPool. [ci skip] 2015-10-14 17:02:45 +02:00
Yves Senn
715d9bd4a1 add missing :nodoc: to AR::Callbacks::ClassMethods. [ci skip] 2015-10-14 16:27:31 +02:00
Yves Senn
8c49fc45be add missing :nodoc: for AutosaveAssociation::ClassMethods [ci skip] 2015-10-14 15:30:13 +02:00
Yves Senn
801371abee fix broken RDoc markup. Use <tt> instead of +. [ci skip] 2015-10-14 13:58:33 +02:00
Yves Senn
31af8c90b6 fix RDoc list markup in DatabaseTasks. [ci skip] 2015-10-14 11:15:40 +02:00
Yves Senn
215e128ddc add missing :nodoc: to ActiveRecord::Scoping. [ci skip] 2015-10-14 09:45:56 +02:00
Arthur Nogueira Neves
7776bde55a Merge pull request #21635 from sideshowcoder/ar_type_docs_fix
Documentation ActiveRecord Attributes API code fix
2015-10-13 21:50:27 -04:00
Arthur Nogueira Neves
2145701cdd Merge pull request #20908 from y-yagi/generate_application_job_inside_engine
add application_job.rb to template of mountable engine
2015-10-13 21:47:29 -04:00
Matthew Draper
c672586b8d Merge pull request #21954 from xtian/patch-1
Fix formatting of ActiveRecord PostgreSQL guide.
2015-10-14 08:27:24 +10:30
Christian Wesselhoeft
0d34b550a4 Fix formatting of ActiveRecord PostgreSQL guide. 2015-10-13 14:50:19 -06:00
Jeremy Daer
9d05430c95 Merge pull request #19135 from yuki24/access-control-support
Add basic support for access control headers to ActionDispatch::Static
2015-10-13 11:16:50 -07:00
Matthew Draper
8e7a3b0563 Merge pull request #21952 from headius/only_one_module_for_deprecation
Only prepend a single module when defining deprecation wrappers.
2015-10-14 03:33:13 +10:30
Charles Oliver Nutter
d29f7fbb10 Only prepend a single module when defining deprecation wrappers.
I could not find any reason why each method got its own prepended
module here, and all tests appear to pass with my change.
2015-10-13 11:16:49 -05:00
Yves Senn
de732e0015 private def breaks RDoc. Move meathod to preserve the docs.
The rdoc parser seems to trip on the `private def` construct.
Public methods following a method defined with `private def` are not
visible inside the module docs but are appended to the top-most module.

For example the method `ActiveRecord::QueryMethods#distinct` was listed
under `ActiveRecord#distinct`.

/cc @sgrif
2015-10-13 15:05:39 +02:00
Yves Senn
718468e1c9 docs, :nodoc: FromClause, QueryAttribute and WhereClauseFactory.
[ci skip]
2015-10-13 14:28:55 +02:00
Yves Senn
f94bf50d35 docs, add missing :nodoc: for Associations::Builder`. [ci skip]
This class is only used internally. We should keep it out of public
documentation. This patch adds nodoc for
`ActiveRecord::Associations::Builder` and everything nested within.
2015-10-13 14:23:24 +02:00
Yves Senn
ba185c6467 nodoc ActiveRecord::ForeignAssociation. [ci skip] 2015-10-13 13:51:24 +02:00
Yves Senn
6e2982fc05 document EagerLoadPolymorphicError. [ci skip]
This error is raised in certain situations when eager loading
polymorphic associations. We even mention it in our docs. It should be
included in our API.

Conflicts:
	activerecord/lib/active_record/associations.rb
2015-10-13 13:36:43 +02:00
Yves Senn
9d02a25d59 nodoc ActiveRecord::Attribute::UserProvidedDefault. [ci skip] 2015-10-13 13:24:07 +02:00
Yves Senn
2cdb912db4 docs, recognize code examples as Ruby in Relation::QueryMethods [ci skip]
Also unify the format of code example output. Only use `# =>` if the
actual return value is described. Otherwise simply use `#`.

Conflicts:
	activerecord/lib/active_record/relation/query_methods.rb
2015-10-13 13:23:01 +02:00
Yves Senn
f338e8082d docs, nodoc internal Active Record DelegateCache. [ci skip] 2015-10-13 12:06:03 +02:00
Yves Senn
4650fb7d5e docs, fix highlighting for code examples in calculations.rb [ci skip] 2015-10-13 12:00:02 +02:00
Yves Senn
5a14349baf :to_table when adding a fk through add_reference.
Closes #21563.

The `name` argument of `add_references` was both used to generate the
column name `<name>_id` and as the target table for the foreign key
`name.pluralize`.

It's primary purpose is to define the column name. In cases where the
`to_table` of the foreign key is different than the column name we
should be able to specify it individually.
2015-10-13 11:05:19 +02:00
Yves Senn
256097cb57 Merge pull request #21938 from kamipo/move_schema_dumping_methods_into_appropriate_files
Move the methods for schema dumping into `{mysql,postgresql}/schema_dumper.rb`
2015-10-13 08:54:04 +02:00
Arthur Nogueira Neves
97cdab0680 Merge pull request #21288 from yahonda/mysql_requires_password
Allow mysql and mysql2 tests run by database user with password
2015-10-12 15:25:04 -04:00
Arthur Nogueira Neves
9674703671 Merge pull request #17388 from akampjes/master
ActionMailer https on URL with force_ssl = true
2015-10-12 14:26:11 -04:00
Ryuta Kamizono
1e797e5ba8 Move the methods for schema dumping into {mysql,postgresql}/schema_dumper.rb
Current master branch includes many schema dumping improvements.
It extract these features to the appropriate files.
2015-10-13 01:32:05 +09:00
Yves Senn
9f4cefd28f Merge pull request #21931 from paul/bugfix/remove-deprecated-pg_dump-flag
Remove deprecated pg_dump -i flag
2015-10-12 16:34:26 +02:00
Yves Senn
4f9ffd5105 Merge pull request #21933 from kamipo/move_schema_definiton_classes_into_appropriate_file
Move schema definiton classes into the appropriate files
2015-10-12 16:22:52 +02:00
Andrew White
f39ab9f343 Merge pull request #21849 from yui-knk/refactor_regexp_to_string
Change `Journey::Route#verb` to return string instead of regexp.
2015-10-12 13:28:03 +01:00
Xavier Noria
96b1fbdeb1 edit pass over the project Gemfile [ci skip]
* Revises the name of Rails components (they have a space).

* Uniform word wrap at column 80..

* Uniform punctuation, according to our guidelines.

* Minor edits of details seen in passing.
2015-10-12 13:50:24 +02:00
Jeremy Daer
b8230e93e4 Merge pull request #21936 from y-yagi/do_not_generate_manifest_in_plugins
do not generate manifest.js in plugins
2015-10-11 23:32:57 -07:00
Claudio B.
ee2c093210 Merge pull request #21934 from etdev/docs/deep-dup-typo
[ci skip] Fix typo in deep_dup docs
2015-10-11 23:10:46 -07:00
yuuji.yaginuma
12248b885c do not generate manifest.js in plugins
Since the plugin generator do not generate assets, I think manifest.js also that it unnecessary.
2015-10-12 14:47:40 +09:00
Eric Turner
dfedaf3795 [ci skip] Fix typo in deep_dup docs 2015-10-12 14:05:53 +09:00
Ryuta Kamizono
11fc84c013 Move schema creation class into mysql/schema_creation.rb
Current master branch includes many schema creation improvements in
MySQL. It extract these features to the appropriate file.
2015-10-11 18:12:23 +09:00
Ryuta Kamizono
5d5de61f45 Move schema definition classes into mysql/schema_definitions.rb
Current master branch includes many schema definition improvements in
MySQL. It extract these features to the appropriate file.
2015-10-11 17:58:04 +09:00
Paul Sadauskas
f3835526ec Remove deprecated pg_dump -i flag 2015-10-10 15:44:58 -06:00
Jeremy Daer
f50d953ff6 Merge pull request #11410 from bogdan/increment-concurency
Make AR#increment! and #decrement! concurrency-safe
2015-10-10 13:24:54 -07:00
Rafael Mendonça França
c61826eebc Merge pull request #20940 from rafaelsales/allow-multiple-root-routes
Allow multiple `root` routes in same scope level
2015-10-10 14:54:35 -03:00
Rafael Sales
4db921a8e7 Allow multiple root routes in same scope level
When an application has multiple root entries with different
constraints, the current solution is to use `get '/'`. Example:

**Currently I have to do:**
```ruby
get '/', to: 'portfolio#show', constraints: ->(req) { Hostname.portfolio_site?(req.host) }
get '/', to: 'blog#show',      constraints: ->(req) { Hostname.blog_site?(req.host) }
root 'landing#show'
```

**But I would like to do:**
```ruby
root 'portfolio#show', constraints: ->(req) { Hostname.portfolio_site?(req.host) }
root 'blog#show',      constraints: ->(req) { Hostname.blog_site?(req.host) }
root 'landing#show'
```

Other URL matchers such as `get`, `post`, etc, already allows this, so I
think it's fair that `root` also allow it since it's just a shortcut for
a `get` internally.
2015-10-10 08:22:31 -03:00
Jeremy Daer
0450642c27 Merge pull request #21631 from RobinClowers/fix-cache-instrumentation
Fix cache fetch instrumentation
2015-10-09 13:58:49 -07:00
Rafael Mendonça França
5c7e992578 Merge pull request #21927 from ronakjangir47/remove_is_a_spec
used predicate methods to avoid is_a? checks
2015-10-09 17:33:52 -03:00
Rafael Mendonça França
e33de7de4d Merge pull request #21928 from Gaurav2728/update_ruby_oracle_gem
update to ruby-oci8 - 2.2.0
2015-10-09 17:31:32 -03:00
Gaurav Sharma
03f4b9468e update to ruby-oci8 - 2.2.0
It stopped `ruby 1.8` support, we already switched to `ruby >= 2.2.2`
2015-10-10 00:34:49 +05:30