19 May 2013

The Ruby Reflector

Topic

Sam Pohlenz

  Source Favicon
By spastorino of Riding Rails - home over 1 year ago.
Email

Ensure that enhancements to assets:precompile task are only run once [ Sam Pohlenz]

TestCase should respect the view assigns API instead of pulling variables on its own. [ José Valim]

javascript path and stylesheet path now refer to /assets if asset pipelining is on. [ Santiago Pastorino]

button_to support form option. Now you're able to pass for example 'data-type' => ' json'. [ihower]

image path and image tag should use /assets if asset pipelining is …

weblog.rubyonrails.org Read
  Source Favicon
By David of David Chelimsky over 2 years ago.
Email

…Rob Sanheim, Roman Chernyatchik, Ryan Bigg, Ryan Briones, Sam Pohlenz, Scott Taylor, Shin-ichiro OGAWA, Thibaud Guillaume-Gentil, Tim Connor, Tim Harper, Tom Stuart, Vít Ondruch, Wincent Colaiuta, aslakhellesoy, eira, garren smith, grosser, hasimo, justinko, rup, speedmax, wycats

Extra special thanks go to:

Chad Humphries for contributing his Micronaut gem which is the basis for rspec-core-2

Yehuda Katz, Carl Lerche, and José Valim, for their assistance …

blog.davidchelimsky.net Read
  Source Favicon
By hongli of Phusion Corporate Blog over 3 years ago.
Email

…as a Rack application instead of a Rails application. Patch contributed by Sam Pohlenz: issue #338 . Increased default socket backlog The default socket backlog has been increased from ‘ SOMAXCONN' (which is 128 on most platforms) to 1024. This should fix most ‘helper_server.sock failed: Resource temporarily unavailable' errors. Apache fixes The location of the ‘apxs' and ‘apr-config' commands can now also be passed to the installer through the -apxs-path …

blog.phusion.nl Read
  Source Favicon
By Sam Pohlenz of SamPohlenz.com over 4 years ago.
Email

Here's a quick snippet I use for quickly disabling chunks of view code.

To use this, just drop the following into your application helper:

Of course, you could just surround your code with <% if false %><% end %> but I think using this simple helper makes the intent slightly clearer.

sampohlenz.com Read
  Source Favicon
By Sam Pohlenz of SamPohlenz.com over 4 years ago.
Email

The generally accepted pattern for the new/create actions of RESTful Rails controllers goes something like this (using Recipes as the model):

The actions for edit/update are fairly similar so I won't show them here. I've also ignored XML responses as they aren't relevant here.

So what is wrong with this? Lets imagine we're filling out the new recipe form, hence our current path looks like /recipes/new. The form is then posted to /recipes and the @recipe.save call …

sampohlenz.com Read
  Source Favicon
By Sam Pohlenz of SamPohlenz.com 5 years ago.
Email

At Good Dog Design, we manage a number of servers for our clients, and are frequently adding new ones. Whilst this process should really be scripted, until we do, this checklist should help cut a lot of the time that goes into setting up a new server.

These checklists are somewhat debian specific as we mainly run debian and ubuntu servers (on Slicehost if you're curious), but many of the points can easily be adapted for your distro of choice.

Core server setup

Reset root password

sampohlenz.com Read