Project

General

Profile

Actions

Patch #32847

closed

Ability to add custom css classes to body tag

Added by Aleksandar Pavic almost 6 years ago. Updated 11 days ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Plugin API
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

This ability is important for plugin developers to avoid unnecessary use of deface gem.

If it's going to be implemented, also wiki page for plugin developers should
be updated, accordingly.


Files

body_css.patch (1.89 KB) body_css.patch Patches application_helper and application_controller adding ability to add custom css class from controller to view body tag... Aleksandar Pavic, 2020-01-21 07:43
Actions #1

Updated by Holger Just over 5 years ago

The changed body_css_classes method is unfortunately not idempotent. Each call of the changed method will add the "normal" classes to the @css instance variable. Thus, if you call the method two times, the list of classes be doubled.

Actions #2

Updated by Go MAEDA 11 days ago

  • Status changed from New to Closed

Plugins can append additional CSS classes to the return value of the body_css_class method by overriding it with Ruby’s Module#prepend.

Actions

Also available in: Atom PDF