kemal kemalcr crystal pass parameter variable to render partial

Looks like you can!

use it as a local variable

– <%= render “views/_box_movie_nik.ecr” %>
+ <%= want_name = true; render “views/_box_movie_nik.ecr” %>

if it says

 

In views/_box_movie_nik.ecr:9:17

9 | <%= want_name ? movie.name_with_episode : movie.episode_without_name %>
^——–
Error: read before assignment to local variable ‘want_name’

 

that means that somewhere you’re using it you’re not setting that variable so run with –error-trace to find it 🙂

One thought on “kemal kemalcr crystal pass parameter variable to render partial”

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.