-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Xcode scheme --work-dir
path was hard coded
#36
Conversation
I have added the ability to created nested resources. I have implemented this the same way as Laravel - namely using dot notation for the path - although this could also be achieved using the controller name. The parameters are all I'll write some tests for this tomorrow (it is night down here) but it works. The new behaviour is: Nested Resources Route.resource("foo.bar", controller: FooBarController())
//Get foo/:foo_id/bar nil
//Post foo/:foo_id/bar nil
//Get foo/:foo_id/bar/:bar_id nil
//Put foo/:foo_id/bar/:bar_id nil
//Delete foo/:foo_id/bar/:bar_id nil Single Resource Route.resource("foo", controller: FooController())
//Get foo nil
//Post foo nil
//Get foo/:id nil
//Put foo/:id nil
//Delete foo/:id nil
|
--work-dir
path was hard coded--work-dir
path was hard coded
//Construct the path for show, update and destroy | ||
let fullPath = num == 1 | ||
? "\(path)/\(params.last!)" | ||
: Zip2Sequence(components, params) |
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.
What is Zip2Sequence
?
This looks great, but I will need to check it out on Mac / Linux and also write tests. Anyway you could separate the |
.joinWithSeparator("/") | ||
|
||
//The path for index and store (ie without the trailing id) | ||
let shortPath = fullPath.stringByReplacingOccurrencesOfString("/" + params.last!, withString: "") |
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 won't run on linux for me, there'll need to be compatibility code.
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.
Cheers thanks. I'll update.
--work-dir
path was hard coded--work-dir
path was hard coded
Done. I have moved the nested resources into a separate branch and will submit a pull request later after I've written some tests. |
So this now only includes the |
Perfect, thanks! |
Xcode scheme `--work-dir` path was hard coded
Changed to:
--work-dir=($SRCROOT)
as it was hard coded to/Users/tanner...
I'm still having all sorts of problems getting anything to build on OSX using the SPM (at least without resorting to Docker) so I have to build using Xcode. This will make it easier for anyone else in my situation.