Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit Resources actions

In my routes.rb I have:

resources :countries do
    resources :cities
end

But I only want:

new:    GET     /countries/:id/cities/new
create: POST    /countries/:id/cities

And not the 7 actions.

What can I do?

like image 591
VMOrtega Avatar asked May 21 '11 16:05

VMOrtega


People also ask

What is a resource policy?

A resource policy is a system rule that specifies resources and actions for a particular access feature. A resource is either a server or file that can be accessed through the system, and an action is to “allow” or “deny” a resource or to perform or not perform a function.

What is action STS AssumeRole?

The sts:AssumeRole action is the means by which such temporary credentials are obtained. To use it, a user or application calls this API using some already-obtained credentials, such as a user's fixed access key, and it returns (if permitted) a new set of credentials to act as the role.

What are the limits for inline IAM policy?

The inline policy character limits are 2,048 for users, 10,240 for roles, and 5,120 for groups.

What is action in AWS policy?

The Action element describes the specific action or actions that will be allowed or denied. Statements must include either an Action or NotAction element. Each AWS service has its own set of actions that describe tasks that you can perform with that service.


2 Answers

Here you go:

resources :cities, :only => [:new, :create]

Reference here.

like image 171
apneadiving Avatar answered Oct 27 '22 01:10

apneadiving


try

 resources :cities, :only => [:new,:create]
like image 37
Naren Sisodiya Avatar answered Oct 27 '22 00:10

Naren Sisodiya