-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small documentation updates #430
Open
crimson-knight
wants to merge
6
commits into
imdrasil:master
Choose a base branch
from
crimson-knight:documentation-updates
base: master
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+58
−8
Open
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
78b0c3b
Updated the shard details for i18n.cr to use the newest version details
crimson-knight 61eeb93
Merge branch 'imdrasil:master' into master
crimson-knight 826fc9e
Update the crystal-lang link to use 'latest' instead of a specified r…
crimson-knight 055d3d8
Add example of using the 'request' relationship parameter on models
crimson-knight 2dafa86
Minor phrasing changes to help readability in docs
crimson-knight 20e49e4
Updated the db log example, added helpful macro for using the test db…
crimson-knight File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer to have mapping at the bottom of the class? Is it because it leaves more space for other information at the top of the file? Did you tested it with MTI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example came from how I was able to get Jennifer working with a DB that was already configured to work this way in a Rails app. It didn't properly use STI, but kind of mocked the behavior.
As far as where the
mapping
macro goes, I like to organize my models so the relationship definitions are at the top of the file, themapping
macro goes below that to make seeing the fields easy, and below that, I define any model methods. Just a personal preference because it makes finding relationships quick and easy.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently all examples follow the opposite notation - mapping first and relations next. Could you please change the order here so it is consistent with other pages?