Comments (3)
We'll also likely need a matcher for /:slug/:project_slug
from deprecated-code-corps-rails-api.
Also see this for more explication: http://stackoverflow.com/questions/33837394/rails-same-top-level-url-route-for-organizations-user-domain-com-user-and-domai
from deprecated-code-corps-rails-api.
The rails side seems relatively simple.
The ember side would be the complicated one, but I guess we could do a manual ajax request instead of a store.find
, followed by figuring out if we got back a user or an organization, pushing it to the store and then and then either redirect to the proper route, or just set the controller model , the type of which determines if we render an organization or a user component. I'm not really sure which one is better in this case, but redirecting to a route would add the additional difficulty of making sure our URL is in the format we'd like it to be.
My question for the rails side is, how would we want to handle our slug?
Is it just a parametrized username/organization.name? Can it be editable? Do we use a gem, such as friendly_id, or just make a slug field and use find_by_slug
? From what I remember from other projects, when we were using a the friendly id gem, there were some complications we had to deal with, both on the API and Ember side.
If we decide in advance the API will never allow us to fetch a user or an organization by id directly, it might be easier to not use the gem and just add a slug field and always fetch by it.
from deprecated-code-corps-rails-api.
Related Issues (20)
- Document User Categories API HOT 1
- Document User Roles API
- Document User Skills API
- Document Users API HOT 1
- Clarify that bin/setup must be run in new terminal window
- Find a way to deploy branch commits HOT 2
- Add ability to assign tasks HOT 1
- Reference GitHub repositories in a project HOT 1
- Reference GitHub repositories in a post HOT 1
- Add project updates to projects HOT 1
- Add GitHub authentication HOT 1
- Connect GitHub repositories to projects HOT 1
- Add the ability to push to Apiary in Circle HOT 2
- Documentation - Issue with credential exchange
- RFC - API Documentation Guidelines HOT 9
- Change wording in role skills
- Make changes suggested by API Blueprint linter
- Find better way of documenting coalesced ids
- Rework User Skills and Role Skills to remove "join table" references
- Fix project#create to respond according to JSON API spec
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from deprecated-code-corps-rails-api.