Commit Graph

1968 Commits

Author SHA1 Message Date
Bikram
94e688dde5 The section that mentions after_commit and after_rollback will swallow exceptions should me made clear. Made that section to be a instead of a regular paragraph. 2013-11-28 19:10:49 +00:00
Yves Senn
598779b749 no need to explain bundler and rails new in the release notes. [ci skip]
/cc @fxn
2013-11-28 18:09:36 +01:00
Yves Senn
f6c1039dd4 delete obsolete KINDLE.md. Closes #13037. [ci skip]. 2013-11-28 17:49:29 +01:00
Yves Senn
7c6d99e81e first pass through CHANGELOGS to extract 4_1_release_notes. [ci skip]
Extract **notable changes**, **deprecations** and **removals** from
each CHANGELOG.

I tried to reference the commits and pull requests for new features
and deprecations.

In the process I also made some minor changes to the CHANGELOGS.

The 4_1_release_notes guide is declared WIP.
2013-11-28 17:24:15 +01:00
Yves Senn
8c944dea76 create 4.1 release notes guide scaffold. [ci skip] 2013-11-28 15:49:01 +01:00
Yves Senn
88fec426fc 3.2 to 4.0 section in upgrading guide is no longer wip. [ci skip] 2013-11-28 15:43:28 +01:00
Yves Senn
9bb173cb34 move "HTTP PATCH" paragraph into "Upgrading 3.2 -> 4.0". [ci skip] 2013-11-28 15:43:28 +01:00
Sagar Junnarkar
e7f533e346 Link for "New Post" is added in Getting Started guide [ci skip]
- Earlier(line number 862) it is said to add <%= link_to 'New post', new_post_path %> on posts index page before table tag. But when posts index page html is shown, "New Post" link is missing.
So aaded "New Post" link in this commit
2013-11-27 11:23:09 +05:30
Yves Senn
36053ce92c sync example and documentation for strong_parameters hash whitelisting.
[ci skip]

This is a follow up to #12609 and integrates #12158.

Thanks @aspiers.
Closes #12158.
2013-11-26 14:50:44 +01:00
Vipul A M
66087189c1 Added rewhere usage to AR querying guides 2013-11-25 12:00:46 +05:30
Xavier Noria
17c29a0df0 Merge remote-tracking branch 'docrails/master'
Conflicts:
	activesupport/lib/active_support/core_ext/hash/deep_merge.rb
	activesupport/lib/active_support/core_ext/hash/keys.rb
2013-11-24 20:00:24 +01:00
Xavier Noria
28a6a7ea3b a couple of copy-edits before merging [ci skip] 2013-11-24 19:55:46 +01:00
Martin Harrigan
08c72946c5 Helper should be a module in Rails guides [ci skip] 2013-11-23 11:26:17 +00:00
Harshad Sabne
eb67aa976b API Documentation Guidelines link correction [ci skip] 2013-11-23 10:45:07 +05:30
Jacob Evan Shreve
c796cc2ba7 Added a missing close parenthesis to i18n.md 2013-11-21 22:18:17 -05:00
Jon Leighton
64b9e93bb5 Fix ActiveRecord::Relation#unscope
I'm pretty confused about the addition of this method. The documentation
says that it was intended to allow the removal of values from the
default scope (in contrast to #except). However it behaves exactly the
same as except: https://gist.github.com/jonleighton/7537008 (other than
having a slightly enhanced syntax).

The removal of the default scope is allowed by
94924dc32baf78f13e289172534c2e71c9c8cade, which was not a change we
could make until 4.1 due to the need to deprecate things. However after
that change #unscope still gives us nothing that #except doesn't already
give us.

However there *is* a desire to be able to unscope stuff in a way that
persists across merges, which would allow associations to be defined
which unscope stuff from the default scope of the associated model. E.g.

  has_many :comments, -> { unscope where: :trashed }

So that's what this change implements. I've also corrected the
documentation. I removed the guide references to #except as I think
unscope really supercedes #except now.

While we're here, there's also a potential desire to be able to write
this:

  has_many :comments, -> { unscoped }

However, it doesn't make sense and would not be straightforward to
implement. While with #unscope we're specifying exactly what we want to
be removed from the relation, with "unscoped" we're just saying that we
want it to not have some things which were added earlier on by the
default scope. However in the case of an association, we surely don't
want *all* conditions to be removed, otherwise the above would just
become "SELECT * FROM comments" with no foreign key constraint.

To make the above work, we'd have to somehow tag the relation values
which get added when evaluating the default scope in order to
differentiate them from other relation values. Which is way too much
complexity and therefore not worth it when most use cases can be
satisfied with unscope.

Closes #10643, #11061.
2013-11-20 22:23:16 +00:00
Jonathan Baudanza
99eb1eb4df Update caching guide with respect to :namespace
Cache::Store does not have a default value for :namespace. If it ever did, I can't find it in the git history.
2013-11-19 17:06:50 -08:00
Carlos Antonio da Silva
20d3484f32 Improve reading / style of hashes in AR guide 2013-11-19 10:54:46 -02:00
Carlos Antonio da Silva
db3ec51832 Revert last two commits mistakenly changing join/include syntax
---

Revert "syntax error joining/including models"

This reverts commit ac35f72f30c47298a20a90c8c537db888b463bbb.

---

Revert "syntax error joining tables"

This reverts commit c365986b48c3e8bc8c7f3fa6a8521616ed5dc138.

---

Comments:

c365986b48 (commitcomment-4630684)
2013-11-19 10:46:55 -02:00
Ben Lewis
5019a046c6 Fixed typos in shallow routes and routing concerns
Grammatical tense correction: "There exists two" => "There exist two".
Plurality correction: "can be reused inside others resources" => "can be reused inside other resources".
2013-11-18 21:10:21 -07:00
Sergio
ac35f72f30 syntax error joining/including models
syntax error joining/including models
2013-11-18 18:39:06 +01:00
Sergio
c365986b48 syntax error joining tables
syntax error joining tables
2013-11-18 18:31:37 +01:00
Paul Nikitochkin
251923c7a8 Instrument each load config initializer
In order to simplify profiling loading of initializers,
added instument for tracking load config initializer event from
`config/initializers`
2013-11-16 21:47:08 +02:00
Peter Vandenabeele
76d4dd6e05 [ci skip] typo in ArgumentError exception 2013-11-16 15:33:14 +01:00
Rafael Mendonça França
38b312a86f Merge pull request #12907 from JuanitoFatas/upgrading
[ci skip] Update gem versions for 3.2 and 3.1. Also change some words.
2013-11-15 18:55:50 -08:00
Juanito Fatas
66e44862bd [ci skip] Update gem versions for 3.2 and 3.1. Also change some words. 2013-11-16 10:24:18 +08:00
Sıtkı Bağdat
324ac5f20b Change Relation#all to Relation#load [ci skip] 2013-11-15 23:31:23 +02:00
Harshad Sabne
4a98938ff4 Update action_controller_overview.md [ci skip]
Code style adherence
2013-11-15 22:32:44 +05:30
Rafael Mendonça França
72551c29f2 Merge pull request #10848 from 907th/add_block_to_cattr_reader
Fix #10847: allow to pass a block to `cattr_reader`.
2013-11-15 07:13:43 -08:00
Nate Berkopec
7910d7d863 Remove broken Commmand Line guide link
[ci skip]
2013-11-15 09:33:49 -05:00
Alexey Chernenkov
0e953c94b1 Unify cattr_* interface: allow to pass a block to cattr_reader.
Example:

    class A
      cattr_reader(:defr) { 'default_reader_value' }
    end
    A.defr # => 'default_reader_value'
2013-11-15 19:54:51 +06:00
Godfrey Chan
b090122e8b Make it clear that require 'active_support' is required [ci-skip] 2013-11-13 13:39:34 -08:00
Harshad Sabne
deeeaef6d2 Fix broken Wikipedia link. 2013-11-13 20:48:40 +05:30
Alex Johnson
ea5d3544d2 Remove outdated guide on using rack builder w/o rails middleware
[ci skip]
2013-11-13 13:35:10 +05:30
Yves Senn
49245f37f7 Revert "remove_column does not take a type argument. [ci skip]. Closes #12864"
As of Rails 4.0 `remove_column` is no longer an alias for `remove_columns`.
The type is actually valid and used when issuing a rollback (new `change` method).

This reverts commit 9c9d4948e428a226a19aa92c17fa6ac5833c2fb8.
2013-11-13 09:02:11 +01:00
Alex Johnson
006f710361 Correct guide relating MiddlewareStackProxy with Enumerable
[ci skip] Enumerable.instance_methods &
Rails::Configuration::MiddlewareStackProxy.instance_methods # =>
[:as_json]

MiddlewareStackProxy does not share any notable methods with Enumerable.
2013-11-13 13:30:58 +05:30
Juanito Fatas
825e350faa [ci skip] Fix curl response output and use strong parameters in update action. 2013-11-13 02:33:04 +08:00
Yves Senn
9c9d4948e4 remove_column does not take a type argument. [ci skip]. Closes #12864 2013-11-12 15:56:52 +01:00
Alex Johnson
b9a4560d91 [ci skip] Replace #=> with # => 2013-11-12 19:23:50 +05:30
Alex Johnson
5735a77def Fix RailsServer#start content in initialization guide
[ci skip]
2013-11-12 19:14:13 +05:30
Yves Senn
bd004eccfa Merge pull request #12851 from RKushnir/master
Include URL helpers in TestController in bug report templates [ci skip]
2013-11-11 12:17:03 -08:00
Roman Kushnir
299fe844dd Include URL helpers in TestController in bug report templates
[ci skip]

Fixes #12848.
2013-11-11 21:28:26 +02:00
Xavier Noria
b31b6e6699 Merge pull request #12815 from Adam89/patch-1
Update security.md [ci skip]
2013-11-11 07:33:38 -08:00
Jimmy Petersen
f387aa1bdd Fixed typo in migrations guide
Product model name was pluralized in example in migrations guide.
[ci skip]
2013-11-11 13:35:57 +01:00
Dmitry Korotkov
bc010e7140 Fix missing line and shadow on static error pages [ci skip] 2013-11-11 11:17:44 +04:00
Jens Dahl Møllerhøj
18010385fd Fixed minor typo
instead of 'rake test' as shortcut, use 'rake'.

Closes #12780 [ci skip]
2013-11-09 18:49:50 -02:00
Adam
336caf9114 Update security.md
Hi Guys 
I was reading through this guide last night and noticed a small mistake, would be great if you could update it. 
I changed the word 'building' to 'build' in line 20. 
"Web application frameworks are made to help developers building web applications"
2013-11-08 13:43:31 -07:00
Gaurish Sharma
2476f9fcd3 ✂️ fix broken url [ci skip] 2013-11-09 00:01:50 +05:30
Xavier Noria
3d5e83fea4 removes redundant curly brackets in example code [ci skip] 2013-11-08 16:55:15 +01:00
Xavier Noria
f0963a61ad Merge pull request #12609 from corwinkelly/patch-1
Update workaround for "Outside the Scope of Strong Parameters"
2013-11-08 07:49:31 -08:00