This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
| # official docs: https://graphql-ruby.org/dataloader/sources.html | |
| # app/graphql/sources/association.rb | |
| class Sources::Association < ::GraphQL::Dataloader::Source | |
| def initialize(association_name, scope = nil) | |
| @association_name = association_name | |
| @scope = scope | |
| end | |
| def fetch(records) |
This is a guide for aligning images.
See the full Advanced Markdown doc for more tips and tricks
| import os | |
| import falcon | |
| import jinja2 | |
| def load_template(name): | |
| path = os.path.join('templates', name) | |
| with open(os.path.abspath(path), 'r') as fp: | |
| return jinja2.Template(fp.read()) |