These are chat archives for locomotivecms/v3

30th
Mar 2016
Lorenzo
@sz23
Mar 30 2016 10:09
Hi! Just a swift question: is it possible to use a variable as parameter for 'path_to' like:
{% path_to var1, locale: var2 }%
Didier Lafforgue
@did
Mar 30 2016 10:11
I’d say so
Lorenzo
@sz23
Mar 30 2016 10:13
Hmm...I see, thank you one more time @did!
Didier Lafforgue
@did
Mar 30 2016 10:14
var2 will be evaluated in the current context
you’re welcome
hblackett
@hblackett
Mar 30 2016 17:14
Hello, I'm using the tag {% with_scope order_by: 'rand' %}. It works fine locally, but not when I deploy to either locomotive.works or Heroku. Any tips or workarounds for a randomised scope much appreciated.
scoobyclub
@scoobyclub
Mar 30 2016 18:37
I’m not sure if it helps here but when using ruby rails I have had problems like this with ‘random’ things due to caching. Essentially it would cache the random record and then return the same record until the cache expired. Just commenting as it might help you search for a solution. In rails you have to use the uncached method on the model to prevent this happening.
hblackett
@hblackett
Mar 30 2016 18:38
Thanks @scoobyclub