save_and_open_page
have_button(locator)| big_hash = { | |
| :random_key => [ | |
| 1, 2, "three", { | |
| :foo => "bar", | |
| :bar => "foo" | |
| } | |
| ], | |
| :another_key => 2, | |
| :yet_another => { | |
| :lorem => { |
| getTreeData: function() { | |
| var rootNotebooks = this.get('rootNodes'); | |
| var data = []; | |
| rootNotebooks.forEach(function(notebook) { | |
| var currentNotebook = notebook; | |
| var dataObj = Ember.Object.create({ | |
| 'text': currentNotebook.get('title'), | |
| 'state' : {'opened' : false, 'selected' : false }, | |
| 'children': [] | |
| }); |
| // utils/computed/search.js | |
| import Ember from 'ember'; | |
| var computed = Ember.computed; | |
| export default function search(dependentKey, propertyKey, searchQueryKey, returnEmptyArray) { | |
| returnEmptyArray = (typeof returnEmptyArray === "undefined") ? false : returnEmptyArray; | |
| return computed("" + dependentKey + ".@each." + propertyKey, searchQueryKey, function() { | |
| var items, query; | |
| if (returnEmptyArray && !this.get(searchQueryKey)) { | |
| return Ember.A([]); |
| function rails_pg() { | |
| rails new $1 -T --database=postgresql && | |
| cd $1 && | |
| echo $1 > .ruby-gemset && | |
| echo 2.0 > .ruby-version && | |
| echo /config/database.yml >> .gitignore && | |
| cp config/database.yml config/database.example.yml && | |
| add_rails_gems && |
| function rails_pg() { | |
| rails new $1 -T --database=postgresql && | |
| cd $1 && | |
| echo $1 > .ruby-gemset && | |
| echo 2.0 > .ruby-version && | |
| echo /config/database.yml >> .gitignore && | |
| cp config/database.yml config/database.example.yml && | |
| add_rails_gems && |