Commit Graph

5 Commits

Author SHA1 Message Date
Kenji Okimoto
56452b211b Remove unnecessary stubs
Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-04-20 16:52:14 +09:00
Kenji Okimoto
8468beb39c Use new keyword style to suppress deprecation warnings
> DEPRECATION WARNING: Using positional arguments in functional tests has been deprecated,
> in favor of keyword arguments, and will be removed in Rails 5.1.
>
> Deprecated style:
> get :show, { id: 1 }, nil, { notice: "This is a flash message" }
>
> New keyword style:
> get :show, params: { id: 1 }, flash: { notice: "This is a flash message" },
>   session: nil # Can safely be omitted.

> DEPRECATION WARNING: Using positional arguments in functional tests has been deprecated,
> in favor of keyword arguments, and will be removed in Rails 5.1.
>
> Deprecated style:
> get :show, { id: 1 }, nil, { notice: "This is a flash message" }
>
> New keyword style:
> get :show, params: { id: 1 }, flash: { notice: "This is a flash message" },
>   session: nil # Can safely be omitted.

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-04-20 16:52:14 +09:00
Kenji Okimoto
fe4dd681b6 Fix render option to suppress deprecation warning
> DEPRECATION WARNING: `render :text` is deprecated because it does not
> actually render a `text/plain` response. Switch to `render plain:
> 'plain text'` to render as `text/plain`, `render html:
> '<strong>HTML</strong>'` to render as `text/html`, or `render body:
> 'raw'` to match the deprecated behavior and render with the default
> Content-Type, which is `text/html`.

Signed-off-by: Kenji Okimoto <okimoto@clear-code.com>
2018-04-20 16:52:14 +09:00
鳥井 雪
771783e3b9 Use let!(:available_locales) to make condition more readable 2015-01-14 14:51:07 +09:00
鳥井 雪
aa0e68d653 Refactor #set_locale in applicaiton_controller
by dividing the method to 3 methods each decides locales from given conditions.
2015-01-14 14:24:00 +09:00