Skip to content
Browse files

FIX: Narrative Bot certificates are ERB templates (#8174)

There are at least two ways of rendering templates outside of the controller. The first one is Rails way enabled with Rails 5
The downside of this method is that all variables need to be passed as params (I could find a way to pass the whole context)

Another way is to use instance_eval described in Erubi documentation - it works perfectly fine, however, I didn't feel very confident about using eval unless necessary.

An additional benefit of using `ApplicationController.render` is that if Rails would change the ERB engine in the future, this code should still work.

If you want to test it on your local, you need to be signed in and then that two URLs are generating certificates:

  • Loading branch information...
lis2 authored and SamSaffron committed Oct 9, 2019
1 parent 3d5f71d commit e2f9b7dd6f52f7a36e2f5e3c2063f727a84e1911

0 comments on commit e2f9b7d

Please sign in to comment.
You can’t perform that action at this time.