added api documentation and some changes in controllers

Now all documentation of controllers is necessary write in doc/spec/*_spec.rb.