gitlab-org--gitlab-foss/config
Stan Hu d800a949d2 Fix Error 500 when creating global milestones with Unicode characters
Two issues:

1. The constraints in the resources were incorrect. Here's what it was before:
```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

In this case, id is actually the title of the milestone, which can be anything at the moment.

After:

```
group_milestone  GET /groups/:group_id/milestones/:id(.:format)  groups/milestones#show {:id=>/[^\/]+/, :group_id=>/[a-zA-Z.0-9_\-]+(?<!\.atom)/}
```

2. `parameterize` would strip all Unicode characters, leaving a blank string. Rails would report something like:

ActionView::Template::Error (No route matches {:action=>"show", :controller=>"groups/milestones", :group_id=>#<Group id: 48, name: "ops-dev", path: "ops-dev", owner_id: nil, created_at: "2015-11-15 08:55:30", updated_at: "2015-12-02 06:23:26", type: "Group", description: "", avatar: "sha1.c71e73d51af1865c1bbbf6208e10044d46c9bb93.png", public: false>, :id=>"", :title=>"肯定不是中文的问题"} missing required keys: [:id]):

This change uses the babosa library to create a better slug, which surprisingly
isn't actually used by the global milestone controllers. Instead, they use the
title passed as a query string for some reason.

Closes https://github.com/gitlabhq/gitlabhq/issues/9881

Fix constraints
2015-12-05 00:04:44 -08:00
..
environments Rails deprecation warning about log_level 2015-12-03 10:53:58 +02:00
initializers Merge branch 'master' into link-refs 2015-12-02 12:12:03 +01:00
locales Added total query time to Sherlock 2015-11-24 10:57:21 +01:00
application.rb Migrate mailers to ActiveJob 2015-11-26 17:03:43 +02:00
aws.yml.example Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
boot.rb init commit 2011-10-09 00:36:38 +03:00
database.yml.mysql set the collation to utf8_general_ci 2014-08-13 14:45:23 +01:00
database.yml.postgresql Remove 'socket' example PostgreSQL parameter 2014-07-01 18:27:50 +02:00
environment.rb Rails update to 4.2.4 2015-11-25 18:18:44 +02:00
gitlab.teatro.yml Revert "Allow to configure smtp and sendmail in gitlab.yml" 2015-05-06 17:39:18 +03:00
gitlab.yml.example Expose artifacts path 2015-11-23 13:05:22 +01:00
mail_room.yml Make Reply by email easier to configure 2015-10-13 13:10:49 +02:00
newrelic.yml Add dormant New Relic gem 2014-09-16 17:31:20 +02:00
resque.yml.example Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
routes.rb Fix Error 500 when creating global milestones with Unicode characters 2015-12-05 00:04:44 -08:00
schedule.rb Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
secrets.yml.example Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
sidekiq.yml.example Groundwork for merging CI into CE 2015-08-25 18:42:46 -07:00
unicorn.rb.example Add a note that changing example configuration files requires changing omnibus-gitlab. 2015-06-11 15:11:37 +02:00
unicorn.rb.example.development Increase unicorn timeout to 60 seconds 2014-09-23 17:11:16 +03:00