• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
Aucun tag

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Redmine Vote Plugin


Commit MetaInfo

Révision4910b7c52438591f7337176878c121abfed16946 (tree)
l'heure2012-07-22 16:21:02
Auteurroot <root@ip-1...>
Commiterroot

Message de Log

development.txt

Change Summary

Modification

--- /dev/null
+++ b/doc/development.txt
@@ -0,0 +1,79 @@
1+開発文書
2+
3+2012年7月15日 福島英俊 初版
4+
5+テーブル定義
6+==============
7+
8+questions(質問テーブル)
9++----------+--------------+------+-----+---------+----------------+
10+| Field | Type | Null | Key | Default | Extra |
11++----------+--------------+------+-----+---------+----------------+
12+| id | int(11) | NO | PRI | NULL | auto_increment |
13+| question | varchar(255) | YES | | NULL | |
14+| multiple | int(11) | YES | | NULL | |
15+| deadline | datetime | YES | | NULL | |
16++----------+--------------+------+-----+---------+----------------+
17+
18+choices(選択肢テーブル)
19++-------------+--------------+------+-----+---------+----------------+
20+| Field | Type | Null | Key | Default | Extra |
21++-------------+--------------+------+-----+---------+----------------+
22+| id | int(11) | NO | PRI | NULL | auto_increment |
23+| question_id | int(11) | YES | MUL | NULL | |
24+| choise | varchar(255) | YES | | NULL | |
25++-------------+--------------+------+-----+---------+----------------+
26+
27+answers(回答テーブル)
28++-------------+--------------+------+-----+---------+----------------+
29+| Field | Type | Null | Key | Default | Extra |
30++-------------+--------------+------+-----+---------+----------------+
31+| id | int(11) | NO | PRI | NULL | auto_increment |
32+| question_id | int(11) | YES | MUL | NULL | |
33+| choise_id | int(11) | YES | MUL | NULL | |
34+| user_id | int(11) | YES | MUL | NULL | |
35+| comment | varchar(255) | YES | | NULL | |
36++-------------+--------------+------+-----+---------+----------------+
37+
38+プラグイン生成
39+================
40+
41+ruby script/rails generate redmine_plugin Votes
42+
43+モデル生成
44+============
45+
46+question モデル
47+
48+ruby script/rails generate redmine_plugin_model votes question question:string multiple:integer deadline:datetime
49+
50+choise モデル
51+
52+ruby script/rails generate redmine_plugin_model votes choise question_id:integer:index choise:string
53+
54+answer モデル
55+
56+ruby script/rails generate redmine_plugin_model votes answer question_id:integer:index choise_id:integer:index user_id:integer:index comment:string
57+
58+コントローラー生成
59+====================
60+
61+questions コントローラー
62+ruby script/rails generate redmine_plugin_controller Votes questions index new edit show
63+
64+choises コントローラー
65+ruby script/rails generate redmine_plugin_controller Votes choises index new edit show
66+
67+answers コントローラー
68+ruby script/rails generate redmine_plugin_controller Votes answers index new edit show
69+
70+ルーティングの設定
71+====================
72+
73+config/routes.rb
74+
75+tes', :to => 'questions#index'
76+
77+
78+
79+以上