From 91fe608f975d144948906c9bc095d32def43ee8b Mon Sep 17 00:00:00 2001 From: Jacek Tomaszewski Date: Wed, 25 Sep 2013 21:24:05 +0200 Subject: [PATCH] Add doc for ApiTaster.route_path (c3ee730d) --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index faa255f..170bfeb 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Rails.application.routes.draw do end ``` -In `routes.rb`, define parameters for each API endpoint after the normal routes definition block. For example: +In `lib/api_tasters/routes.rb`, define parameters for each API endpoint after the normal routes definition block. For example: ```ruby if Rails.env.development? @@ -60,6 +60,11 @@ if Rails.env.development? end ``` +You can change the default `lib/api_tasters/routes.rb` path by creating `config/initializers/api_taster.rb` with the content below: +```ruby +ApiTaster.route_path = Rails.root.to_s + "/app/api_tasters" # just an example +``` + ### Share Params with Test Factories If you use a test factory such as [FactoryGirl](https://github.com/thoughtbot/factory_girl), you can require your test factories and share the params. For example in FactoryGirl you can use the `attributes_for(:name_of_factory)` method.