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

Idea: check Rails flash.new vs. flash #307

Open
david-a-wheeler opened this issue Feb 6, 2018 · 0 comments
Open

Idea: check Rails flash.new vs. flash #307

david-a-wheeler opened this issue Feb 6, 2018 · 0 comments

Comments

@david-a-wheeler
Copy link

Here's an enhancement idea.

In Rails, flash.now should never end up with redirect_to, and flash (without .now) should normally not end up at "render". However, it's not that hard to make that mistake, especially after making other changes. I think it'd be useful for rails_best_practices to detect that case.

E.g., detect misuses like this:

      flash.now[:danger] = t('admin_only')
      redirect_to '/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant