I have created a resource with its respective model and controller, in which I seek to customize the style of the site, in which I modify the value of the attribute and when changing, change the style of certain elements of the site, for example:
<nav class="header" style="background: <%= @setting.header_color %><% else %>">
However, although it works in the views of the same resource does not work out of it, since I get a nil error, and wanted to help me to use it regardless of the view, perhaps stating something in application controller