Commit cee113c3fca295e0960035719c3f9a79efe1d7a2
Committed by
Rafael Manzo
1 parent
3287c5d1
Exists in
colab
and in
4 other branches
configuration combobox of new repository is working
Showing
6 changed files
with
50 additions
and
48 deletions
Show diff stats
.gitignore
app/controllers/repositories_controller.rb
@@ -18,6 +18,7 @@ class RepositoriesController < ApplicationController | @@ -18,6 +18,7 @@ class RepositoriesController < ApplicationController | ||
18 | def new | 18 | def new |
19 | @project = Project.find(params[:project_id]) | 19 | @project = Project.find(params[:project_id]) |
20 | @repository = Repository.new | 20 | @repository = Repository.new |
21 | + | ||
21 | end | 22 | end |
22 | 23 | ||
23 | # GET /repositories/1/edit | 24 | # GET /repositories/1/edit |
app/views/repositories/_form.html.erb
@@ -30,8 +30,8 @@ | @@ -30,8 +30,8 @@ | ||
30 | </div> | 30 | </div> |
31 | 31 | ||
32 | <div class="field"> | 32 | <div class="field"> |
33 | - <%= f.label :configuration %><br> | ||
34 | - <%= f.text_field :configuration_id %> | 33 | + <% configuration_list = KalibroEntities::Entities::Configuration.all.map { |conf| [conf.name, conf.id] } %> |
34 | + <%= f.select( :configuration_id, configuration_list ) %> | ||
35 | </div> | 35 | </div> |
36 | <div class="actions"> | 36 | <div class="actions"> |
37 | <%= f.submit %> | 37 | <%= f.submit %> |
config/database.yml.sample
1 | -# SQLite version 3.x | ||
2 | -# gem install sqlite3 | ||
3 | -# | ||
4 | -# Ensure the SQLite 3 gem is defined in your Gemfile | ||
5 | -# gem 'sqlite3' | ||
6 | development: | 1 | development: |
7 | adapter: sqlite3 | 2 | adapter: sqlite3 |
8 | database: db/development.sqlite3 | 3 | database: db/development.sqlite3 |
9 | pool: 5 | 4 | pool: 5 |
10 | timeout: 5000 | 5 | timeout: 5000 |
11 | 6 | ||
12 | -# Warning: The database defined as "test" will be erased and | ||
13 | -# re-generated from your development database when you run "rake". | ||
14 | -# Do not set this db to the same as development or production. | ||
15 | test: &test | 7 | test: &test |
16 | adapter: sqlite3 | 8 | adapter: sqlite3 |
17 | database: db/test.sqlite3 | 9 | database: db/test.sqlite3 |
@@ -25,4 +17,4 @@ production: | @@ -25,4 +17,4 @@ production: | ||
25 | timeout: 5000 | 17 | timeout: 5000 |
26 | 18 | ||
27 | cucumber: | 19 | cucumber: |
28 | - <<: *test | ||
29 | \ No newline at end of file | 20 | \ No newline at end of file |
21 | + <<: *test |
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +# SQLite version 3.x | ||
2 | +# gem install sqlite3 | ||
3 | +# | ||
4 | +# Ensure the SQLite 3 gem is defined in your Gemfile | ||
5 | +# gem 'sqlite3' | ||
6 | +development: | ||
7 | + adapter: sqlite3 | ||
8 | + database: db/development.sqlite3 | ||
9 | + pool: 5 | ||
10 | + timeout: 5000 | ||
11 | + | ||
12 | +# Warning: The database defined as "test" will be erased and | ||
13 | +# re-generated from your development database when you run "rake". | ||
14 | +# Do not set this db to the same as development or production. | ||
15 | +test: &test | ||
16 | + adapter: sqlite3 | ||
17 | + database: db/test.sqlite3 | ||
18 | + pool: 5 | ||
19 | + timeout: 5000 | ||
20 | + | ||
21 | +production: | ||
22 | + adapter: sqlite3 | ||
23 | + database: db/production.sqlite3 | ||
24 | + pool: 5 | ||
25 | + timeout: 5000 | ||
26 | + | ||
27 | +cucumber: | ||
28 | + <<: *test | ||
0 | \ No newline at end of file | 29 | \ No newline at end of file |
config/database.yml~
1 | - development: | ||
2 | - adapter: sqlite3 | ||
3 | - database: db/development.sqlite3 | ||
4 | - pool: 5 | ||
5 | - timeout: 5000 | 1 | +development: |
2 | +adapter: sqlite3 | ||
3 | +database: db/development.sqlite3 | ||
4 | +pool: 5 | ||
5 | +timeout: 5000 | ||
6 | 6 | ||
7 | -#development: | ||
8 | -# adapter: postgresql | ||
9 | -# host: localhost | ||
10 | -# encoding: utf8 | ||
11 | -# database: mezuro | ||
12 | -# username: mezuro | ||
13 | -# password: mezuro | ||
14 | - | ||
15 | - test: | ||
16 | - adapter: sqlite3 | ||
17 | - database: db/test.sqlite3 | ||
18 | - pool: 5 | ||
19 | - timeout: 5000 | ||
20 | - | ||
21 | -# test: | ||
22 | -# adapter: postgresql | ||
23 | -# host: localhost | ||
24 | -# encoding: utf8 | ||
25 | -# database: mezuro | ||
26 | -# username: mezuro | ||
27 | -# password: mezuro | 7 | +test: &test |
8 | +adapter: sqlite3 | ||
9 | +database: db/test.sqlite3 | ||
10 | +pool: 5 | ||
11 | +timeout: 5000 | ||
28 | 12 | ||
29 | production: | 13 | production: |
30 | - adapter: sqlite3 | ||
31 | - database: db/production.sqlite3 | ||
32 | - pool: 5 | ||
33 | - timeout: 5000 | 14 | +adapter: sqlite3 |
15 | +database: db/production.sqlite3 | ||
16 | +pool: 5 | ||
17 | +timeout: 5000 | ||
34 | 18 | ||
35 | -#production: | ||
36 | -# adapter: postgresql | ||
37 | -# host: localhost | ||
38 | -# encoding: utf8 | ||
39 | -# database: mezuro | ||
40 | -# username: mezuro | ||
41 | -# password: mezuro | 19 | +cucumber: |
20 | + <<: *test |