Skip to content

Instantly share code, notes, and snippets.

/**
* Open file.csv and read all lines
**/
var fs = require('fs');
var casper = require('casper').create({
verbose: true,
logLevel: 'error',
pageSettings: {
@maxim
maxim / rails_load_path_tips.md
Last active April 13, 2023 13:28
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

@murdoch
murdoch / README.markdown
Created August 10, 2012 12:54 — forked from greypants/README.markdown
RAILS 3: nav_link helper for adding 'selected' class to navigation elements

#Behold, the nav_link:

The nav_link helper works just like the standard Rails link_to helper, but adds a 'selected' class to your link (or its wrapper) if certain criteria are met. By default, if the link's destination url is the same url as the url of the current page, a default class of 'selected' is added to the link.

For full usage details, see: http://viget.com/extend/rails-selected-nav-link-helper

Drop nav_link_helper.rb into app/helpers in your Rails 3.x app and enjoy.

#About this fork

@greypants
greypants / README.markdown
Last active October 17, 2023 05:49 — forked from reagent/nav_link.rb
RAILS 3: nav_link helper for adding 'selected' class to navigation elements