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
allow super index to be called #165
Conversation
I'm generally 👎 on inheriting controller code for public facing route options i.e. show, index, etc. This will fail if there's any kind of render or redirect in the other index action (double redirect error). Tests are failing. What's your use case here? |
Hi @schneems , The inherited I will fix the Travis, the codes is fine in my local controllers which has |
What is your specific use case? What are you trying to do? What action exists in the index action you're trying to inherit? |
I override other plugins setup to step by step. One is spree. The spree admin countries use index method. And using the index, edit, update show method name usually got conflict with other gems. If it is configureable or use some specific names Co-founder On Feb 18, 2015, 12:47 PM, at 12:47 PM, Richard Schneeman notifications@github.com wrote:
|
This is the first time i've seen wicked breaking an inherited controller method in the ~3 years it's been around. I'm not convinced it's a use case we should be catering to. You can get around this already with metaprogramming. Something like: class MyController < SpreeController::Foo
alias_method :index_without_wicked :index
include Wicked::Wizard
def index
index_without_wicked
end
end Should get you what you need. It's too error prone to call super in the wicked index since we don't have a good idea of what that method would be doing. |
Hi @schneems, Thanks for the comments, First off, after reading your comments, my new commit didn't call the My use case is simple make existing Registration or Configuration into stepbystep by putting decorators the The only challenge is fixed by able to rename the The challenge in your solution is I have no way to update Spree's or other gem's With this simple rename
Example can be simply be using Devise Session and Regitration Controller directly. With little CSS update, the Devise form will be turned into a StepByStep quickly. Currently way just won't work without own partials to handle the forms. |
No description provided.