Skip to content

Instantly share code, notes, and snippets.

@blaisethomas
Last active August 29, 2015 14:16
Show Gist options
  • Save blaisethomas/ec642dfececb5dab3d84 to your computer and use it in GitHub Desktop.
Save blaisethomas/ec642dfececb5dab3d84 to your computer and use it in GitHub Desktop.
Week 8 Day 4 Answers:

Q - How is D3 different from user interaction manipulating DOM elements?

A - the DOM is manipulated by data

Q - how do I add D3 to my app?

A - minified file, CDN, unminified (we did <script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script> in class)

Q - Assuming a model and controller exist, where would I write a custom helper method that is available application wide?

A - (ApplicationHelper or application_helper.rb)

Q - What built in helper method renders a long number in human language?

A - <%= number_to_human(2342342352352) %>

Q - Where could I override a rails default behavior like changing the plural of cactus to cacti?

A - config>initializers>inflections.rb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment