I added a custom value in the user form in my redmine. It's a boolean value (a checkbox). My custom value's id is 8
I'm trying to get it's value in a view hook (view_issues_show_description_bottom)
So with this code in my hook class :
cv = CustomValue.where('custom_field_id = 8').first
context[:cv] = cv
And this code in my .view file
<% if cv.value == "1" %>
At the beginning it worked, but then after that i added other fields, and it's not working anymore.
I guess there is a better way to get the custom value from the current user ? I'm a complete beginner with ruby so i really don't know how to fix this.
Thx a lot