2018-10-06

[08:35:02]
ariejan:
Hi. I'm trying to understand how a rendered view fetches instance variables (in the code). I've found `view_assigns` and I see how those assigns get loaded up in `@_assigns` in ActionView::Base, but I can't seem to locate the place where you get that data out - and what happens when a variable is not there. Note: I'm trying to find the code where this happens in Rails - I know how it all works :-)

2018-08-17

[11:56:26]
ariejan:
Hi. I've have a vanilla rails 5.2 form_for with some text fields. Validations work (tested, debugged), but the "field_with_errors" wrappers do not appear in my form. Any clue on why that stopped working?

[08:42:02]
ariejan:
chridal: you may have a `stylesheet_link_tag` in your layout/views to a file that's not setup for the asset pipeline. This matches your issue, as it will probably load fine on development, but missing on prod.

2017-07-17

2017-07-03

[10:34:21]
ariejan:
Hi. Running a rails 5.0.1 project where, in Jbuilder views, asset_url will not use config.action_controller.asset_host. Worse, the `config` Actionview's AssetUrlHelper uses is empty. Any ideas on how to troubleshoot this further?

2015-08-10

[10:59:06]
ariejan:
Q: I setup a demo shop, changed zones and shipping methods (all for 'Netherlands'). A new order (to Netherlands) now says it's unable to calculate shipping rates. Any clue on what might be wrong/

2015-02-16

2015-01-26

[09:41:27]
ariejan:
I have a module, which gets included into a class. But calling the method just returns ???nil???, method not executed, so it seems. https://gist.github.com/ariejan/809659c42fdbda2e8eac

[09:43:12]
ariejan:
atmosx: think of it like this: you have a method calling itself, calling itself, etc.

[09:43:41]
ariejan:
atmosx: to process a list, your method takes a list, processes the first argument, and calls itself with the rest of the list, until there is no ???rest??? left, just one element to process.

[09:50:23]
ariejan:
the print_list method takes an array of integers. It uses Array#shift to take an delete the first element of the array and print out the result. It then calls itself again to process the rest of the list. The kicker is that there is a guard in the method to just do nothing (return) if the provided list is empty.