Class WebConsole::View
In: lib/web_console/view.rb
Parent: ActionView::Base

Methods

Public Instance methods

Execute a block only on error pages.

The error pages are special, because they are the only pages that currently require multiple bindings. We get those from exceptions.

Render inlined string to be used inside of JavaScript code.

The inlined string is returned as an actual JavaScript string. You don‘t need to wrap the result yourself.

Render JavaScript inside a script tag and a closure.

This one lets write JavaScript that will automatically get wrapped in a script tag and enclosed in a closure, so you don‘t have to worry for leaking globals, unless you explicitly want to.

Override method for ActionView::Helpers::TranslationHelper#t.

This method escapes the original return value for JavaScript, since the method returns a HTML tag with some attributes when the key is not found, so it could cause a syntax error if we use the value in the string literals.

[Validate]