Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nested resource update action && no dashboard without namespace #186

Closed
panva opened this issue Jun 13, 2011 · 6 comments
Closed

nested resource update action && no dashboard without namespace #186

panva opened this issue Jun 13, 2011 · 6 comments
Assignees
Labels
Milestone

Comments

@panva
Copy link

panva commented Jun 13, 2011

i encountered issue with nested resource while having

# active_admin.rb
default_namespace :admin
# images.rb
belongs_to :article

After submiting the edit form for Image active_admin tries to redirect me to article_image_path instead of admin_article_image_path

i needed to continue development so i tried to set no namespace and this works fine, however now i do not get my dashboard loaded properly

(active_admin master branch, rails 3.0.8)

@ghost ghost assigned gregbell Jun 13, 2011
@panva
Copy link
Author

panva commented Jun 13, 2011

Also, with everything default except for

# active_admin.rb
config.default_namespace = false

you generate wrong logout path in the layout

/false/logout instead of /admin_users/logout
and the logout path is generated as /false instead of just /

@brunoarueira
Copy link
Contributor

I had a same problem about the config.default_namespace = false with rails 3.0.3.

@DougPuchalski
Copy link
Contributor

I've been wrestling with namespaces for weeks. You might want to try :root instead of false, but there are still issues. I think it just hasn't really been tested as of yet.

@jocubeit
Copy link

I'm having the same issues here using config.default_namespace = false. None of the Devise routes work anymore, in fact I end up in an endless loop error:

Too many redirects occurred trying to open...

Dashboard doesn't work no matter where you put it, what you call it, or what routes you create.

Is there an estimated timeframe on milestone 0.3.0? I'm trying to decide if I need the lack of namespace enough to fix it myself because I want to roll this app out by weeks end.

@DougPuchalski
Copy link
Contributor

Personally I have had to abandon all immediate hopes of using this gem in anything other than the /admin namespace, and regret it took me so long to make that decision. I've spent many hours trying to get around limitations only to bump up against another every time. It's also hard to justify the risk of time given that the master branch might diverge even further from what I might expect.

The architecture of this gem is quite clever and I like a lot about it, including the arbre library (which I would love to see extracted for use externally). But, as an example, I think the choice to use a DSL to generate an application layout assumes a very narrow use-case, diverges too far from the Rails Way and makes it very difficult (or at least non-DRY) to integrate into, at least, my projects and leverage a consistent user experience. The master branch focus has some basic assumptions that don't yet allow for as much flexibility as my projects require, and I think there are still some critically hooks as well. I do expect that to improve, but, the layout issue still troubles me a lot and prevents me from confidently embracing it as a key component of my apps.

So, I assume the present goals of the project are for it to be a sidelined admin interface. Best use is to not fight the defaults, and wait for the it to mature.

whatthewhat pushed a commit to whatthewhat/active_admin that referenced this issue Aug 13, 2011
@fro
Copy link

fro commented Feb 5, 2012

@aceofspades " I think the choice to use a DSL to generate an application layout assumes a very narrow use-case, diverges too far from the Rails Way and makes it very difficult (or at least non-DRY) to integrate into, at least, my projects and leverage a consistent user experience. "

I agree... indeed, AA is a nice choice for really simple Apps admin created in a breeze.
I'm struggling with it because my project have a lot nested resources... I can't find an elegant solution to handle these case...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants