This repository has been archived by the owner on Feb 24, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 579
Singularization fails on "aliases" #1571
Milestone
Comments
Oh ok did not notice it was happening here. |
Please.
…-----------
Mark Bates
On Feb 5, 2019, 2:30 PM -0500, Michel Blanc ***@***.***>, wrote:
Oh ok did not notice it was happening here.
I can send a PR if you wish.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Well, spoke to fast. Can't spot it. We already have Note that I use go modules, so may be I am not using this package at all ? I see the two flect packages in
|
I transferred it back, as the issue is in Buffalo. it was using inflect and not flect. |
markbates
added a commit
that referenced
this issue
Feb 5, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Description
When creating an API project from scratch with
aliases
actions andalias
resource, parameter ID for Show/Update/Delete is searched under thealiase_id
key instead ofalias_id
.Inflect package seems fine in this regard (https://github.com/markbates/inflect/blob/master/inflect.go#L237).
Steps to Reproduce the Problem
Generate a new project
buffalo new aliases --api· cd aliases buffalo generate resource aliases
Setup database
Fix
database.yml
and create a postgres user:Then create and migrate database:
Add a record
Now retrieve this record
On the server, you can see the parameter set un
aliase_id
instead of \alias_id`:Expected Behavior
The parameter should be named
alias_id
.Actual Behavior
The parameter should is named
aliase_id
.Info
Please run
buffalo info
and paste the information below where it says "PASTE_HERE".The text was updated successfully, but these errors were encountered: