Skip to content

Instantly share code, notes, and snippets.

= I18n.backend.translate("zh-TW", "tags.#{tag_of_like_article.tag_type}")
Article.joins(:tags).where(tags: {id: tag_ids_arr}).order("articles.updated_at DESC").pluck(:id).uniq
// get text for element without children text
var article_title_in_cn = $this.clone().children().remove().end().text().trim();
function reset_colors(map) {
var layer = map.featureLayer,
geoJson = layer.getGeoJSON(),
features = geoJson.features;
for (var i = 0; i < features.length; i++) {
features[i].properties['marker-color'] = "#0F86BD";
}
layer.setGeoJSON(geoJson);
}