blob: 1b9192f7b128b23bb23503ca86fa31235b2b4906 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
Description:
Stubs out the controller and API for a new web service using the deprecated
Action Web Service framework. Pass the web service name, either CamelCased
or under_scored, and a list of API methods as arguments. To create a web
service within a module, use a path like 'module_name/web_service_name'.
This generates a controller in app/controllers, an API definition
in app/apis, and functional tests in test/functional.
Example:
`./script/generate web_service User add edit list remove`
creates the User controller, API, and functional test:
Controller: app/controllers/user_controller.rb
API: app/apis/user_api.rb
Test: test/functional/user_api_test.rb
Modules Example:
`./script/generate web_service 'api/registration' register renew`
creates the Registration controller, API, and functional test:
Controller: app/controllers/api/registration_controller.rb
API: app/apis/api/registration_api.rb
Test: test/functional/api/registration_api_test.rb
|