How to create your own Ruby gem

April 6, 2013 · Posted in Development · 1 Comment 

This post is the guide to creating your own gem for Rails.

Read more

Using CDN with Rails assets

March 25, 2013 · Posted in Development · Comment 

Read more

Rails disable logging of asset pipeline messages

March 22, 2013 · Posted in Development · Comment 

There are many assets related log messages in log file. It causes Rack to use the Rails logger very  frequently.

Read more

Password protecting pages of Rails App

March 17, 2013 · Posted in Development · 1 Comment 

Often it is needed to close a whole app or some pages of a Rails app in Beta mode. A simple and quick way is using http authentication. So users (beta testers, admin) can access a Rails app by entering a single username and password.
Read more

Rails Best Practices

January 5, 2013 · Posted in Development · Comment 

A collection of tips and tricks to make Rails applications better.
Read more

Link to download an image as attachment in Rails (send_file and remote files)

January 1, 2013 · Posted in Development · 2 Comments 

Build a link_to to download an image.

Read more

Python vs Ruby and Django vs. Rails

December 29, 2012 · Posted in Development · Comment 

In this post I am collecting opinions about pros and cons of using two popular web frameworks Python’s Django and Ruby on Rails in web development. I tried to include all factors that matter to choose between two frameworks.

Read more

Sessions do not work in Internet Explorer in Rails

December 29, 2012 · Posted in Development · Comment 

Recently I had a strange problem when sessions didn’t work on my site on Rails in production environment. The problem was in Internet Explorer while it worked in Firefox and Chrome.

Read more

Cropping and resizing images using MiniMagick (Ruby on Rails)

September 3, 2012 · Posted in Development · Comment 

There are a number of algorithms to crop and resize images. Like maintaining the original image’s aspect ratio, cropping over-sized images, padding to fill empty area.

This posts shows two approaches – with cropping and without cropping. Read more

Rails 3 Select Tag with List of Countries

June 15, 2012 · Posted in Development · 2 Comments 

This post is to assist to create a select tag in a view (HTML) with a list of countries.

The solution presented here:

- The countries are stored in a table in database. If you don’t want to have a table with countries in DB, you can easily modify the code below to have countries as an array in code.

- Helper to show a list of countries in select tag in HTML

 

You can find the whole solution on github.

Read more

Next Page »