Creating Collections becomes much easier with the Base Collection.
In this example I will walk through some of the default conventions and requirements for creating such a collection.
localhost:[port]/jasmine |
#should only need to be done once | |
gem 'jasmine' | |
gem 'guard-jasmine' | |
gem "jasminerice", :git => 'https://github.com/bradphelan/jasminerice.git' |
route -n get default | grep gateway | awk '{print $2}' |
#usage _! (2 previous lines) _! 3 (3 previous lines) | |
def _!(num = 2) | |
line = Pry.history.to_a[-1-num] | |
puts "evaling #{line}" | |
unless line == '_!' or line == '_' | |
Pry.send(:eval, line) | |
end | |
end |
USAGE="Usage: csv_split file.csv (lines to be included use n..n as a range)" | |
if [ "$#" == 0 ]; then | |
echo "$USAGE" | |
exit 1 | |
fi | |
filename=$1 | |
shift |
#!/bin/sh | |
gcherry(){ | |
if [ $1 ];then | |
name=$1 | |
else | |
name="@{-1}" | |
fi | |
echo "cherry picking $( git reflog $name -n 1 )" | |
git cherry-pick $( git reflog $name -n 1 | awk '{print $1}' ) |
#actually renders the validations | |
#if you are using listenTo these arguments are automatically passed in | |
renderValidations: (model, errors)-> | |
_.each errors, (error) => | |
$el = if error.cid then @$("[data-id=#{error.cid}]") else @$el | |
selector = if error.nested_attr then "[data-nested-name=#{error.nested_attr}]" else "[name=#{error.name}]" | |
#validations are namespaced by model id for removal | |
$el.find(selector).after("<span class='#{model.cid}-validation label label-important'>#{error.errors.join(', ')}</span>") | |
Creating Collections becomes much easier with the Base Collection.
In this example I will walk through some of the default conventions and requirements for creating such a collection.
Creating Models becomes much easier with the Base Model.
In this example I will walk through some of the default conventions and requirements for creating such a model.