Don’t you know that minitest also have a similar let() helper that does exactly the same job as the one of RSpec. But some people do not fully understand the difference between defining object in let() and before() block.
Traditionally, pogstgresql is installed manually with MacPort or Homebrew on Mac OSX 10.7+. I used
to have lots of problem with the setup for the installation as it requires Xcode, this libs and that libs, etc.
In summary, it is not convenient enough and I want something as simple as dragging an OS app to my /Application.
Thanks to Heroku, they took the heed and create Postgres.app. A wrapper bundled with binary postgresql server.
It is not only easy to install but also easy to setup config file if you are using Rails.
In this tutorial, I will show you how to install ghostscript on Heroku Cedar.
As you might have known that Heroku virtual machine does come with a system-wide
ghostscript version which is located at /usr/bin/gs. You can find out the
location of this version:
Liquid is a powerful templating tool especially when
used with rails. It is quite common that you have to expose ActiveRecord attributes
to liquid. You can achieve that by implement to_liquid method in your ActiveRecord
model so it acts as if it were Liquid::Drop, OR you can use the helper liquid_methods
to tell which attributes / call-able methods of the instance that could be passed
with the liquid_methods call. In most of cases, people tend to use the latter method
because they could narrow the exposure scope to liquid.
However, what if your model has so many attributes and typing all them out for
the liquid_methods seems arduous, you can dynamically mapping attributes by
creating a module: