Merge remote-tracking branch 'upstream/pull/4349'
Use html 'time' element for friendly date helpers This provides more structure than just a simple span.
Improve name selection with the query tool Pass the full expanded list of preferred languages to the client and use that when looking for the best name for an object. Fixes #4310
Fix predicate method names in the user model
Add home location condition to user model
Handle exceptions rendering flash messages
Switch web site to use OAuth 2
Use hash-based flash objects to render complex flash messages Since flash objects can only be String, Hash or Array (notably excluding SafeBuffers), then this approach is necessary to render complex html in a safe manner. Each local can be treated as an (unsafe) string, and therefore escaped normally when rendered into the template. The template (and translation strings) can contain html since they are no longer stored in the flash as a plain string. Fixes #3215
Fix new rubocop warnings
Remove the old richtext_area helper This has been superseded by the `f.richtext_field` custom form builder.
Fix new rubocop warnings
Break long URLs where richtext is used. For example on the blog post show page. This uses https://getbootstrap.com/docs/4.4/utilities/text/#word-break to break long URLs on the blog post show view.
Fix some rubocop todos
Fix new rubocop warnings
Make linkify return an HTML safe result for unsafe inputs Fixes #2567
Add a friendly_date_ago helper Refs #2255
Remove if_user and similar methods Rather than hiding features based on CSS, just avoid including them in the output. Fixes #1862
Fix new rubocop warnings
Update to rails 5.1.4
Convert @user to current_user in helpers