Flowdock
method

assign

Importance_1
v3.0.9 - Show latest stable - 0 notes - Class: ActionView::Helpers::PrototypeHelper::JavaScriptGenerator::GeneratorMethods
assign(variable, value) public

Assigns the JavaScript variable the given value.

Examples:

# Generates: my_string = "This is mine!";
page.assign 'my_string', 'This is mine!'

# Generates: record_count = 33;
page.assign 'record_count', 33

# Generates: tabulated_total = 47
page.assign 'tabulated_total', @total_from_cart
Show source
Register or log in to add new notes.