forked from fixin.me/fixin.me
Measurement form based on select-styled <details>
This commit is contained in:
3
app/models/measurement.rb
Normal file
3
app/models/measurement.rb
Normal file
@@ -0,0 +1,3 @@
|
||||
class Measurement
|
||||
include ActiveModel::Model
|
||||
end
|
||||
@@ -100,6 +100,11 @@ class Quantity < ApplicationRecord
|
||||
name
|
||||
end
|
||||
|
||||
def to_s_with_depth
|
||||
# em space, U+2003
|
||||
' ' * depth + name
|
||||
end
|
||||
|
||||
def destroyable?
|
||||
subquantities.empty?
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user