mirror of
https://github.com/Threnklyn/Klaus.git
synced 2026-06-13 08:03:32 +02:00
Klaus V2.0
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
module ToDropdown
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def to_option
|
||||
[name, id]
|
||||
end
|
||||
|
||||
module ClassMethods
|
||||
def to_dropdown
|
||||
all.order(:name).map(&:to_option)
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user