Closed nickbarnwell closed 9 years ago
What's this for right now? https://github.com/TeaWithStrangers/tws-on-rails/blob/master/app/models/city.rb#L24-L26
Returns a record suitable for use in a query string.
The path forward I see for this is:
city_code
column+index to slug
for_code
on the City object to query via slug instead.Hosts are more complex; the reason I used ID was that names are terrible identifiers:
sluggable
module or similar where the slug is only editable by Admins and will eventually be set through our admin control panel. All lookups on sluggable objects can then be a Model.find_by(slug: $slug) || Model.find(id: $slig)
proposition.I think host identifier fields should be as follows:
Hopefully Nickname = Username, but in the case of two people with same Nickname, ask them to write in their own Username (default behavior = autofill Username with what they entered in Nickname with error if there's a duplicate).
I think because hosts can change their cities (when traveling or when moving to a new home), their URLs should be /hosts/nick
instead of /cities/seattle/nick
.
And if we could, I'd love to make cities /san-francisco
instead of /cities/san-francisco
, and we could ensure that no cities have shortcodes that match another route on the website (i.e. error if someone creates city with shortcodes like:
How complex is this to accomplish?
P.S. I think shortcodes should actually be full city names with hyphens for spaces (i.e. san-francisco
, seattle
, and philly
instead of sf
, sea
, phl
. Some cities would have the same shortcode, like DC. I know that would make them...not-short shortcodes, but I think it's easier to follow and remember for users looking for specific pages without going through the homepage.
what's the purpose of a nickname?
As we're going to be increasing the host count 400% in the next 2 weeks, I want to resurface this. @nickbarnwell I know you had objections to implementation here. Could we discuss those, sort out a clear approach and make this happen before the end of this week?
Let's chat about this tonight
On Wed, Jul 16, 2014 at 4:50 PM, ankitshah811 notifications@github.com wrote:
As we're going to be increasing the host count 400% in the next 2 weeks, I want to resurface this. @nickbarnwell https://github.com/nickbarnwell I know you had objections to implementation here. Could we discuss those, sort out a clear approach and make this happen before the end of this week?
— Reply to this email directly or view it on GitHub https://github.com/TeaWithStrangers/tws-on-rails/issues/7#issuecomment-49243015 .
this is done.
E.g. for a city
/cities/san-francisco/
and/cities/san-francisco/ankit
for a host