FAQ Database Discussion Community


What does the exception “ArgumentError: a promise has already been chained” mean, and how do I debug it?

voltrb
I'm going a little nuts working with Volt at the moment. The moment I try to do something a bit more complicated I end up getting the exception "ArgumentError: a promise has already been chained" in the browser console. The stack trace doesn't point to anything I can interpret as...

Appending an element to a page in VoltRb

html,ruby,opalrb,voltrb
I'm trying to append an element to one of my pages in a Volt project, via opal-browser, like so: if RUBY_PLATFORM == 'opal' require 'browser' $document.body << my_dom_element.to_n end # controller code below Unfortunately, I'm getting an error: [Error] TypeError: null is not an object (evaluating 'value.nodeType') (anonymous function) (main.js,...

Volt adding multiple class in view

voltrb
I'm building a website with Volt 0.9 and I'm trying to customize my main.html regarding navigation. Well, there is and if binding in the :Nav section to add a class. The problem is that I want to add another class with another if binding. I've tried to add a second...

Requiring files in the Volt Framework

ruby,require,mixins,voltrb
I have a mixin I want to include in a few different classes in a Volt app. Pertinent structure as follows: Including file path: app/component_1/models/my_model.rb Included file path: app/component_2/mixins/my_mixin.rb Here's what I've tried: require "#{Volt.root}/app/component_2/mixins/my_mixin" yields this error in the server output when loading a page: SyntaxError: Cannot handle dynamic...

How to integrate other javascript library in Volt framework?

voltrb
I can't understand how to integrate existing JavaScript libraries into Volt. With Volt 0.9.3 Opal Native object isn't available and use only the backticks with interpolation seems no pratical.