http://pragprog.com/titles/rails4/agile-web-development-with-rails you need to buy this book.
or http://api.rubyonrails.org/ complete API guide.
or search google with this query "ruby rails tutorial + pdf" you will get lot of content most of them are in pdf form.