Added Quantity nesting with awesome_nested_set
This commit is contained in:
@@ -5,4 +5,11 @@ module QuantitiesHelper
|
||||
[translations[k.to_sym], k]
|
||||
end
|
||||
end
|
||||
|
||||
def parent_options
|
||||
options = nested_set_options(Quantity, @quantity) do |i|
|
||||
raw("#{' ' * i.level}#{i.name}")
|
||||
end
|
||||
options.unshift([t('.null_parent'), nil])
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user