binding.remote_pryin the code to drop into pry. Also need to have
pry-remoteopen in a terminal window.
powder applog-> is like trace for pow
- to output notices to the log
wrote a rake task to hit the route with httparty
- This stackoverflow post helped
render :nothing => truewhen hitting a controller acton that doesn’t render a view
Ran into an
uninitialized constant GitFetcherror. I actually remembered to restart my Redis server!!! (after 20 minutes)
To access the Reds cli and flushall these are the commands…
reg expressions can kick out multiple match groups. These are accessible with array notion.
 is always the matching string,
 would be the first match, and
 would be the second and so on. Rubular throws off the match groups for you to access.
- disabled the CSRF verifcation with
skip_before_filter :verify_authenticity_tokenfound at
- think about subscribe or unsubscribe on pubsubhubbub
- when to trigger the subscription? in an asynch worker? in the clone method
- because you have have access to the process and the user?
- this can be easily called with Octokit (See below)
We really shouldn’t be invoke cURL methods in the model or background job. Octokit allows users to easily subscribe to pubsubhubbub. It’s all here.
I was going to do this… but it wasn’t neccessary with octokit
1 2 3 4
Sidekiq best practices
Parsing a yaml file of quotes
Formatted array of strings in YAML:
1 2 3 4 5 6 7 8 9
Yaml is white space sensitive, but not new-line sensitive for strings as long as the new-line is within the the quotes.
I then selected a random element with the
.sample method. Very cool.
Had to look in the Slim docs. I was looking for output, which is controlled by the = sign. Figured it out after that…
- remember to migrate Test DB
rake environment RAILS_ENV=test db:migrate
- add test helpers for devise
- A factory generates test data to pass to the controller method; note the use of Factory Girl’s
attributes_foroption, which generates a hash of values as opposed to a Ruby object.
- Rewatched the RailsCasts no. 158
- Don’t pass in more params than you need. It makes the unit testing harder and it isn’t neccessary.
- refer to Sandi Metz’s comments about passing in a params hash if you are accessing multiple attributes of an object