Version.all.map &:server_id
Server.all.map &:version_ids
Version.includes(:server).all.map &:server_id
Server.includes(:versions).all.map &:version_ids
def filename
model.file_name = Russian.translit(original_filename) || model.file_name
end
$timeout(function(){$(window).resize()})
<marker data-item="{{item.id}}" ng-repeat="item in items" onclick="go(this.dataset.item)" position="{{item.coords}}">
</marker>
var tempArr = [10, 50, 100, 358];
async.eachSeries(tempArr, function(val, index, done){
console.log('[Перебор массива tempArr] Итерация #' + index);
if(val == 100) {
console.log('Нашли нужное значение в массиве! Index = ' + index);
return false;
}
else done();
});
.filter('addIngrFilter', [function() {
return function (items, item){
var filtered = [];
items.forEach(function(items){
if(items.indexOf(item.id)<0){
filtered.push(item);
}
});
return filtered;
};
}]);
<div>{{dishIngredientsIndexes | item_for_exclude}}</div>
div ng-include="children_renderer.html"
script type="text/ng-template" id="children_renderer.html"
ul
li ng-repeat="node in node.children"
i ng-click="node.isHide=!node.isHide" ▼
span
| {{node.title}}
div ng-include="'children_renderer.html'" ng-hide="node.isHide"