#form
f.input, :groupable_gid, as: :select, collection: [groupable.name, groupable.to_gid]
#polymorphic model
def groupable_gid
groupable&.to_global_id
end
def groupable_gid=(gid)
self.groupable = GlobalID::Locator.locate gid
end
#form
f.input, :groupable_gid, as: :select, collection: [groupable.name, groupable.to_gid]
#polymorphic model
def groupable_gid
groupable&.to_global_id
end
def groupable_gid=(gid)
self.groupable = GlobalID::Locator.locate gid
end
For further actions, you may consider blocking this person and/or reporting abuse
Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.
JetThoughts Dev -
JetThoughts Dev -
Ashitosh Shinde -
Yaryna Kobryn -
Top comments (0)