If you ever needed to paste a code that you have written in your favorite IDE or editor inside Microsoft Word and do not want to lose your formatting, then PlanetB is a really great tool that gives you that opportunity. It has a really easy-to-use user interface. It comes with the support for several programming languages like: C/C++, C#, CSS, Delphi, Pascal, XML, Java, Javascript, PHP, Python, Ruby, SQL, VB and HTML. Continue reading
Tag: controller
There can be cases where you wished you named that controller a lot better, as it does not make any sense and is very ambiguous in its current form. If you have ever wondered whether there is a way for you to do quick renamings of multiple related files inside a Rails project, then I have some good news for you. There is already a gem called Rails Refactor, that can be used to do these renamings. Continue reading
Rails controllers have callbacks that can be useful when we want to execute a particular piece of code before or after other methods have been invoked. However, there is no Rails built-in after_response_sent callback that could be used to invoke a method after we have rendered the response to the user, either via an HTML or JSON response. Continue reading
You may have cases when you may need to do some authorizations for certain pages, so that they cannot be accessed by unauthorized clients. There are many authorization ways that you can use in a Ruby on Rails application. In this article, I will mention one very simple, yet not that much famous method that comes implemented and ready to be used each time you create a new Rails application. Continue reading