Hi, @samnang; here are a few links I found that might help.
Rails API documentation guide: API Documentation Guidelines — Ruby on Rails Guides
Rails API document generator: rapi_doc | RubyGems.org | your community gem host
Another Rails API documentation generator gem: https://github.com/Pajk/apipie-rails
Use integration tests: Auto generate/maintain API documentation using Rails integration tests - RubyFlow
Hopefully some of that will be on target