From 5657280a628ca52a27df5c35d35049ab27b61ae7 Mon Sep 17 00:00:00 2001 From: Yauheni Dakuka Date: Mon, 25 Sep 2017 15:05:17 +0300 Subject: new missing backquotes [ci skip] --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index c7331b6ca4..343c224a7c 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -1322,7 +1322,7 @@ engine. Assets within an engine work in an identical way to a full application. Because the engine class inherits from `Rails::Engine`, the application will know to -look up assets in the engine's 'app/assets' and 'lib/assets' directories. +look up assets in the engine's `app/assets` and `lib/assets` directories. Like all of the other components of an engine, the assets should be namespaced. This means that if you have an asset called `style.css`, it should be placed at -- cgit v1.2.3 From e65f2c4f9d25e47a0adc59a43f0a00c5397aedd8 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Hirano Date: Tue, 26 Sep 2017 04:03:09 +0900 Subject: Add an space to RefineryCMS in Engine guide [ci skip] * According to the official website, it seems that "RefineryCMS" is "Refinery CMS". * See at: http://www.refinerycms.com/ --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index 343c224a7c..188620a683 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -63,7 +63,7 @@ authentication for its parent applications, or [Thredded](https://github.com/thredded/thredded), an engine that provides forum functionality. There's also [Spree](https://github.com/spree/spree) which provides an e-commerce platform, and -[RefineryCMS](https://github.com/refinery/refinerycms), a CMS engine. +[Refinery CMS](https://github.com/refinery/refinerycms), a CMS engine. Finally, engines would not have been possible without the work of James Adam, Piotr Sarnacki, the Rails Core Team, and a number of other people. If you ever -- cgit v1.2.3 From de2afdc457d63ee628b5cac4e7bb73812e016e38 Mon Sep 17 00:00:00 2001 From: Yauheni Dakuka Date: Fri, 6 Oct 2017 09:02:56 +0300 Subject: Cosmetic fixes [ci skip] --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index 188620a683..738de5d588 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -653,7 +653,7 @@ there isn't an application handy to test this out in, generate one using the $ rails new unicorn ``` -Usually, specifying the engine inside the Gemfile would be done by specifying it +Usually, specifying the engine inside the `Gemfile` would be done by specifying it as a normal, everyday gem. ```ruby -- cgit v1.2.3 From 639fded77b5797b7770c99a76a40c141cc95c178 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Hirano Date: Mon, 9 Oct 2017 10:11:03 +0900 Subject: Use `form_with` instead of `form_for` in engine guide [ci skip] --- guides/source/engines.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index 738de5d588..9f39832a7e 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -537,12 +537,12 @@ directory at `app/views/blorgh/comments` and in it a new file called ```html+erb

New comment

-<%= form_for [@article, @article.comments.build] do |f| %> +<%= form_with(model: [@article, @article.comments.build], local: true) do |form| %>

- <%= f.label :text %>
- <%= f.text_area :text %> + <%= form.label :text %>
+ <%= form.text_area :text %>

- <%= f.submit %> + <%= form.submit %> <% end %> ``` @@ -783,8 +783,8 @@ added above the `title` field with this code: ```html+erb
- <%= f.label :author_name %>
- <%= f.text_field :author_name %> + <%= form.label :author_name %>
+ <%= form.text_field :author_name %>
``` -- cgit v1.2.3 From 0149481b1b29ac15197f1abe8a3961d8cb2926b6 Mon Sep 17 00:00:00 2001 From: Yoshiyuki Hirano Date: Fri, 13 Oct 2017 08:59:20 +0900 Subject: Capitalize "sprockets" in Engine guide [ci skip] --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index 9f39832a7e..a9b841e3bf 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -1361,7 +1361,7 @@ that only exists for your engine. In this case, the host application doesn't need to require `admin.css` or `admin.js`. Only the gem's admin layout needs these assets. It doesn't make sense for the host app to include `"blorgh/admin.css"` in its stylesheets. In this situation, you should -explicitly define these assets for precompilation. This tells sprockets to add +explicitly define these assets for precompilation. This tells Sprockets to add your engine assets when `bin/rails assets:precompile` is triggered. You can define assets for precompilation in `engine.rb`: -- cgit v1.2.3 From 65e08da68f6b344243f3c7bba0aee68342ee2228 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sat, 28 Oct 2017 12:42:21 +0900 Subject: Add load hook for `ActionDispatch::SystemTestCase` This is useful to extend `SystemTestCase`. Also, since other test classes already have load hooks, should also be in `SystemTestCase`. Ref: 0510208dd1ff23baa619884c0abcae4d141fae53 --- guides/source/engines.md | 1 + 1 file changed, 1 insertion(+) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index a9b841e3bf..b226eac347 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -1501,6 +1501,7 @@ To hook into the initialization process of one of the following classes use the | `ActionController::Base` | `action_controller` | | `ActionController::TestCase` | `action_controller_test_case` | | `ActionDispatch::IntegrationTest` | `action_dispatch_integration_test` | +| `ActionDispatch::SystemTestCase` | `action_dispatch_system_test_case` | | `ActionMailer::Base` | `action_mailer` | | `ActionMailer::TestCase` | `action_mailer_test_case` | | `ActionView::Base` | `action_view` | -- cgit v1.2.3 From ed564f7db7fb9df58b095b66ab4668f626d6c4b5 Mon Sep 17 00:00:00 2001 From: "Ashley Engelund (weedySeaDragon @ github)" Date: Sun, 26 Nov 2017 00:16:38 -0800 Subject: gendered wording not necessary; changed to neutral [ci skip] --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index b226eac347..8f4edce04a 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -921,7 +921,7 @@ engine: mattr_accessor :author_class ``` -This method works like its brothers, `attr_accessor` and `cattr_accessor`, but +This method works like its siblings, `attr_accessor` and `cattr_accessor`, but provides a setter and getter method on the module with the specified name. To use it, it must be referenced using `Blorgh.author_class`. -- cgit v1.2.3 From 2cec7ccc691f9abaa480e23f57c4003f766c876d Mon Sep 17 00:00:00 2001 From: "Ashley Engelund (weedySeaDragon @ github)" Date: Sun, 26 Nov 2017 00:21:29 -0800 Subject: verb tense correction [ci skip] --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index 8f4edce04a..fddfdd37e7 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -982,7 +982,7 @@ Blorgh.author_class = "User" WARNING: It's very important here to use the `String` version of the class, rather than the class itself. If you were to use the class, Rails would attempt to load that class and then reference the related table. This could lead to -problems if the table wasn't already existing. Therefore, a `String` should be +problems if the table didn't already exist. Therefore, a `String` should be used and then converted to a class using `constantize` in the engine later on. Go ahead and try to create a new article. You will see that it works exactly in the -- cgit v1.2.3 From 092d1af137d6d52349880417923874e17508e608 Mon Sep 17 00:00:00 2001 From: "Ashley Engelund (weedySeaDragon @ github)" Date: Sun, 26 Nov 2017 00:31:40 -0800 Subject: fix comma splice [ci skip] --- guides/source/engines.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/engines.md') diff --git a/guides/source/engines.md b/guides/source/engines.md index fddfdd37e7..33694cf76a 100644 --- a/guides/source/engines.md +++ b/guides/source/engines.md @@ -1514,7 +1514,7 @@ To hook into the initialization process of one of the following classes use the ## Configuration hooks -These are the available configuration hooks. They do not hook into any particular framework, instead they run in context of the entire application. +These are the available configuration hooks. They do not hook into any particular framework, but instead they run in context of the entire application. | Hook | Use Case | | ---------------------- | ------------------------------------------------------------------------------------- | -- cgit v1.2.3