-
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
Closely related to #56 . This issue is about exploring the idea of adding a Props::Fragment object. Fragments are defined like this:
json.note(
partial: [
"club_notes/note",
fragment: "club_note_#{@club_note.id}",
]
) do
# Empty block here
end
But it can be a bit tedious to define across different props templates if they are used elsewhere. I'm considering adding a Props::Fragment object that folks can inherit from. So we can turn the above to
class NoteFragment < Props::Fragment
end
json.note(NoteFragment.new(@club_note.id))
Internally we'll call something like responds_to?(:to_prop_options)which we can call to return the work done at #56
Metadata
Metadata
Assignees
Labels
No labels