This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module I18n | |
module Backend | |
class Simple | |
# Monkey-patch-in localization debugging | |
# Enable with ENV['I18N_DEBUG']=1 on the command line in server startup, or ./config/environments/*.rb file. | |
# | |
def lookup(locale, key, scope = [], options = {}) | |
init_translations unless initialized? | |
keys = I18n.normalize_keys(locale, key, scope, options[:separator]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example with basic types | |
--- | |
hash: | |
string: some text | |
number: 12345 | |
array_of_bool: [on, off, true, false, yes, no] | |
ruby symbol: :symbol | |
array: | |
- item one | |
- item two |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html data-ng-app> | |
<head> | |
<title>AngularJS Directives and Data Bindings</title> | |
</head> | |
<!-- init directive --> | |
<body data-ng-init="people = ['John Smith', 'John Doe', 'Jane Doe']"> | |
<!-- model directive --> | |
Name: <input type="text" data-ng-model="name"> <br> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |