Input form for creation
Input form for creation
Strong parameter definitions for creation form
Strong parameter definitions for creation form
SkinnyModel for this resource.
SkinnyModel for this resource.
Resource name in the singular.
Resource name in the singular. This name will be used for path and validator's prefix.
Resource name in the plural.
Resource name in the plural. This name will be used for path and directory name to locale template files.
Input form for modification
Input form for modification
Strong parameter definitions for mofidication form
Strong parameter definitions for mofidication form
Note: Same action method name should be registered several times.
Note: Same action method name should be registered several times. For example, put("/members/:id")(...).as('update) and patch("/members/:id")(...).as('update).
Adds action definition
Add param to params in the request scope.
Override to append HTTP method information to Route objects.
Override to append HTTP method information to Route objects.
Registers afterAction to this controller.
Registers afterAction to this controller.
this action should be applied only for these action methods
this action should not be applied for these action methods
action
If you prefer #afterFilter than #afterAction, keep going!
If you prefer #afterFilter than #afterAction, keep going!
Base path.
Base path.
Registers beforeAction to this controller.
Registers beforeAction to this controller.
this action should be applied only for these action methods
this action should not be applied for these action methods
action
If you prefer #beforeFilter than #beforeAction, keep going!
If you prefer #beforeFilter than #beforeAction, keep going!
Default charset.
Default charset.
Creates skinny.I18n instance for current locale.
Creates skinny.I18n instance for current locale.
current locale
i18n provider
Creates new resource.
Creates new resource.
POST /{resources}
format
created response if success
Creates TemplateEngine instance for Skinny app.
Creates TemplateEngine instance for Skinny app.
configuration
TemplateEngine instance
Overrides Scalatra's default key name.
Overrides Scalatra's default key name.
Returns action name for this request.
Returns current locale for this request.
Returns current locale for this request.
current locale
Outputs debug logging for passed parameters.
Outputs debug logging for passed parameters.
input form
id if exists
Outputs debug logging for permitted parameters.
Outputs debug logging for permitted parameters.
permitted strong parameters
id if exists
Overrides to make the template path simpler.
Overrides to make the template path simpler.
paths
Destroys the specified resource.
Destroys the specified resource.
DELETE /{resources}/{id}
id
format
result
Executes resource creation.
Executes resource creation.
permitted parameters
generated resource id
Executes deletion of the specified single resource.
Executes deletion of the specified single resource.
id
count
Executes modification for the specified resource.
Executes modification for the specified resource.
id
permitted parameters
count
Shows input form for modification.
Shows input form for modification.
GET /{resources}/{id}/edit
id
format
input form
Halts with body which responds to the specified format.
Halts with body which responds to the specified format.
response type
http status
format (HTML,JSON,XML...)
body if possible
Overrides to skip execution when the current request matches excluded patterns.
Overrides to skip execution when the current request matches excluded patterns.
Handles when CSRF is detected.
Handles when CSRF is detected.
Predicates current env is "development" or "dev".
Predicates current env is "production" or "prod".
Predicates current env is "staging" or "qa".
Predicates current env is "test".
JSON format support implicitly.
JSON format support implicitly.
Shows input form for creation.
Shows input form for creation.
GET /{resources}/new
format
input form
Declarative activation of CSRF protection.
Declarative activation of CSRF protection. Of course, highly inspired by Ruby on Rails.
should be applied only for these action methods
should not be applied for these action methods
Renders body with template.
Renders body with template.
path name
format (HTML,JSON,XML...)
body
Renders body which responds to the specified format (JSON, XML) if possible.
Renders body which responds to the specified format (JSON, XML) if possible.
entity
format (HTML,JSON,XML...)
body if possible
Renders body with template.
Renders body with template.
path name
format (HTML,JSON,XML...)
true/false
Fetches value from request scope.
Fetches value from request scope.
type
key
value if exists
Set attributes to request scope.
Set attributes to request scope.
collection of key and value.
self
Set attribute to request scope.
Set attribute to request scope.
key and value
self
Returns whole request scope attributes.
Returns whole request scope attributes.
whole attributes
Defines formats to be respond.
Defines formats to be respond. By default, HTML, JSON, XML are available.
formats
Scalate extension name.
Scalate extension name. If you'd like to use another one, override this attribute.
Session key to store current locale string.
Set attributes to request scope.
Set attributes to request scope.
Set attribute to request scope.
Set attribute to request scope.
Set params which is generated from a model object using Java reflection APIs.
Set params which is generated from a model object using Java reflection APIs.
model instance
Set notice flash message for successful completion of creation.
Set notice flash message for successful completion of creation.
Set current locale.
Set notice flash message for successful completion of deletion.
Set notice flash message for successful completion of deletion.
Set {{skinny.
Set {{skinny.I18n}} object for the current request to request scope.
current locale
self
Set params to request scope.
Set params to request scope.
Set params to request scope.
Set params to request scope.
Set notice flash message for successful completion of modification.
Set notice flash message for successful completion of modification.
Show single resource.
Show single resource.
GET /{resources}/{id} GET /{resources}/{id}.xml GET /{resources}/{id}.json
id
format
single resource
Shows a list of resource.
Shows a list of resource.
GET /{resources}/ GET /{resources} GET /{resources}.xml GET /{resources}.json
format
list of resource
Env string value from "skinny.
Env string value from "skinny.env" or "org.scalatra.environment".
env string such as "production"
Predicates the template path is available.
Predicates the template path is available.
path name
format (HTML,JSON,XML...)
true/false
Returns the actual template path for the name.
Returns the actual template path for the name.
path name
format (HTML,JSON,XML...)
actual path
Updates the specified single resource.
Updates the specified single resource.
PUT /{resources}/{id}
id
format
result
Use relative path if true.
Use relative path if true. This is set as false by default.
If you set this as true, routing will become simpler but /${resources}.xml or /${resources}.json don't work.
Creates validator with prefix(resourceName).
Creates validator with prefix(resourceName).
validations validations
current locale
validator
Creates new validation form.
Creates new validation form.
key prefix for error message
validations
current locale
validator
Provides code block with format.
Provides code block with format. If absent, halt as status 406.
response type
format
action
result
(Since version 2.1.0) Do not invoke directly. Use withRequest
to change the binding, or request to get the value
(Since version 2.1.0) Do not invoke directly. Use withResponse
to change the binding, or response
to get the value
(Since version 2.1.0) Use servletContext instead
(Since version 2.0.0) Use prepareCsrfToken()
(Since version 2.0.0) not idiomatic Scalate; consider layoutTemplate instead
(Since version 2.1.0) Use status_=(Int) instead
Skinny resource is a DRY module to implement ROA(Resource-oriented architecture) apps.
SkinnyResource is surely inspired by Rails ActiveSupport.