byCoder
byCoder

Reputation: 9184

Rails create admin controller and view in other directory and with own style

I need to do own administration logic, with it's controllers, view etc... ActiveAdmin and so over are not good for me. But how can i do this in other directory (for example controllers/admin/). How to write then rails g command? (view must be in folder admin too). Also how to connect twitter bootstrap only for admin controllers?

Upvotes: -1

Views: 5081

Answers (1)

knownasilya
knownasilya

Reputation: 6143

Have a look at this link, where they use the same admin subdirectory grouping (link broken) example. The example is for an older version of Rails, but should be relatively valid for Rails 3.2.

Edit: See this namespaces question.

rails generate controller admin/Users

For bootstrap, just don't use the bootstrap specific id/class attributes in your admin stylesheet.

Upvotes: 3

Related Questions