English 中文(简体)
在使用活性污染物时,你如何使违约铁路行动消失?
原标题:When using Active Admin, how do you make the default rails actions disappear?

I ve implemented active admin, but I was wondering how to get the default controller actions of "new, update, edit, destroy" to go away. Right now what I did was remove the actions from the controller, deleted the corresponding views. But if I go to like localhost:3000/pages/new I get something like this: "Unknown action The action new could not be found for PagesController". What I d really like is for that to redirect to the admin login page. But I m unsure how to go about that. I tried this:

match  *path  => redirect( /admin )

but no luck. Any help would be greatly appreciated! Thanks.

最佳回答

您需要删除<代码>资源:在您的路线上。

问题回答

暂无回答




相关问题
ActiveAdmin Rails edit/delete

Using ActiveAdmin for a rails application (very impressed so far). My question is, when I let it do it s default thing, it displays all the fields plus 3 other links that allow me to edit / delete ...

Image file input with Formtastic and ActiveAdmin

I started using formstatic but I need to make a file field with an image preview. I mean, when I edit an object, I want to see the image already linked. How can I do that?

undefined variable or method params for ActiveAdmin

Just installed Rails 3.1 rc5 and ActiveAdmin from rails-3-1 branch. Installation went good, and I see the login form. However when I login with provided username/password I m getting the following ...

ActiveAdmin Comment model not working properly

I created a blog by following the Getting Started with Rails precisely. And then I following the tutorial here to try ActiveAdmin: http://activeadmin.info/documentation.html. It s working fine for ...

Using Rails Gem Active Admin with Associations

I m trying out the new Rails gem http://activeadmin.info/ and it s working great! However I can t find any documentation on how to use it across associations. For example: class Membership < ...

热门标签