...both objects into a new object literal: let merged = { ...a, ...b } When you have Unpoly let merged = up.util.merge(a, b) When you only have ES5 let merged = Object.assign({}, a, b...
...So I had to come up with my own. The Solution: I wrote an unpoly compiler that crawls the document and replaces all occurencies of certain word and puts a...
import 'brace/mode/html' import 'brace/theme/monokai' let editor = ace.edit(element) ... Full-fledged example for an Unpoly compiler that will improve your : import ace from 'brace' import 'brace/mode/html' import 'brace/theme/monokai' up.compiler('[html...
...useful to later select it from JavaScript or to update a fragment with an Unpoly. Haml lets you use square brackets ([]) to generate a unique class name and ID from...
The generated application now has a sleek, simple design based on Bootstrap Employing Unpoly New application model DSL shortcut crud for "create a model and a web UI with...
...params from a url. You can use this library (not tested): jquery-deparam Use Unpoly and the following code snippet
...this also works for any other hash attribute. Consider an Angular directive or an Unpoly compiler that is configured by several attributes. Usually you'd prefix them with the directive/compiler...
= gallery_form.submit Javascript Now to the dynamic part. I built it with an Unpoly compiler, but the code will work without as well. up.compiler '[gallery-form]', (element) -> imageTemplate = element.find...
...up responses for XHRs that want to load something else (like HTML views in Unpoly). Your actions should choose the response format via the respond_to method: def show # ...
...without leading slash. Make to employ the fix as noted above. If you use Unpoly you may also use up.util.parseUrl(), which implements the technique in this card with tests and...
...browsers will not execute Javascript for some combinations of modifiers. This was extracted from Unpoly...