[from now] 2013/04/21 18:34:50

diff --git a/grails-app/controllers/SignupController.groovy b/grails-app/controllers/SignupController.groovy
index d156492..0e3b3d8 100644
--- a/grails-app/controllers/SignupController.groovy
+++ b/grails-app/controllers/SignupController.groovy
@@ -1,10 +1,14 @@
+import sayaka.command.SignupCommand
+
 class SignupController {

     def form() {
         render view: 'signup'
     }

-    def signup() {
+    def signup(SignupCommand command) {
+        command.singup()
+
         render text: "ok!"
     }
 }
diff --git a/src/groovy/sayaka/command/SignupCommand.groovy b/src/groovy/sayaka/command/SignupCommand.groovy
new file mode 100644
index 0000000..8be5dbb
--- /dev/null
+++ b/src/groovy/sayaka/command/SignupCommand.groovy
@@ -0,0 +1,24 @@
+package sayaka.command
+
+import grails.validation.Validateable
+import sayaka.User
+
+
+@Validateable
+class SignupCommand {
+
+    String username
+    String password
+
+    def singup() {
+        def user = new User()
+
+        println username
+        println password
+
+        user.username = username
+        user.password = password
+
+        user.save(flush: true, failOnError: true)
+    }
+}