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

Remove unused notice #14044

Closed
wants to merge 2 commits into from
Closed

Remove unused notice #14044

wants to merge 2 commits into from

Conversation

fredplante
Copy link
Contributor

The given notice is never shown because notice are only rendered on the show view

The given notice is never shown because notice are only rendered on the show template
@fredplante fredplante closed this Feb 13, 2014
@fredplante fredplante reopened this Feb 13, 2014
@carlosantoniodasilva
Copy link
Member

Thanks, but we don't feel it's unused. The fact that the flash only happens to be in the show view is because it was only used there, and when the notice was added to the destroy action, we should've updated the index view too.

Maybe you'd like to change your PR to add the flash the index view instead? This way the flash will be properly displayed. Let me know if you can/want to do that, otherwise I can do it myself later this week.

@fredplante
Copy link
Contributor Author

Carlos, I thought it have to be removed because a default scaffolding with jbuilder enabled produce a destroy action without any notice. So I proposed that behavior to be consistent with what scaffolding do on a standard new rails app. Please let me know what option you want, I would be very happy to contribute, even on a very minor fix/improvment like this one.

arunagw added a commit to arunagw/jbuilder that referenced this pull request May 2, 2014
This is same as we do without JBuilder
See this for more rails/rails#14044
@arunagw
Copy link
Member

arunagw commented May 2, 2014

@f-plante thanks for PR. I think we need this when we are doing things with including JBuilder.

I have added a PR here rails/jbuilder#191

@rafaelfranca
Copy link
Member

Do we? I checked the index template and we are not showing notice there.

@arunagw
Copy link
Member

arunagw commented May 7, 2014

@rafaelfranca we have it here I think https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/scaffold_controller/templates/controller.rb#L50

As PR in JBuilder is merged so this can be closed. As we have both consistent on both the places now.

Closing this now. thanks @f-plante.

@arunagw arunagw closed this May 7, 2014
@rafaelfranca
Copy link
Member

@rafaelfranca rafaelfranca reopened this May 7, 2014
@arunagw
Copy link
Member

arunagw commented May 7, 2014

True there is no flash message when we destroy.

Sorry my bad. I made a change in JBuilder as well which needs to revert then.

@rafaelfranca
Copy link
Member

I think the proper fix is to make index show the notice

arunagw added a commit to arunagw/rails that referenced this pull request Jul 4, 2014
As we are setting notice in destroy action we should display that

For more information see rails#14044
And rails/jbuilder#191

closes rails#14044
@rafaelfranca
Copy link
Member

Closed by #16048

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

Successfully merging this pull request may close these issues.

None yet

6 participants