1
0

Added Ingredient visibility filter

Fixed index display (many? -> any? persisted)
This commit is contained in:
cryptogopher
2019-11-02 19:30:52 +01:00
parent 05c79782f5
commit 3294689cb4
8 changed files with 24 additions and 10 deletions

View File

@@ -14,6 +14,11 @@ module IngredientsHelper
options_for_select(options, disabled: disabled)
end
def visibility_options(selected)
options = [["all", nil], ["visible", 1], ["hidden", 0]]
options_for_select(options, selected)
end
def unit_options
@project.units.map do |u|
[u.shortname, u.id]