Should we use prepend_before_action in Rate Limiting?

I was trying out the new rate limiting feature on a devise controller and found that it wasn’t working as expected because the rate limiting callback was executing after the devise callbacks, so I couldn’t use the rate_limit helper, and had to write a prepend_before_action callback.

I think it would make sense to use prepend_before_action instead of before_action. Maybe I’m missing something, but at least an option to opt in to that behaviour would be useful.

1 Like