Developers may feel they do not have that much creativity when it comes to use random words as arguments, or values for many fields. For example, if we have some test cases when we are creating a new instance of a Book object, chances are that we will assign ‘book’ to this object’s title, which does not seem that much interesting. We code because it is something that gives us pleasure, and getting help with these types of difficulties can be helpful. Fortunately, there is a Ruby gem called Faker that generates random fake value that you can use in your tests.
Tag: ruby (Page 3 of 3)
Redmine is a flexible project management web application that is open source, written in Ruby on Rails. If you need to start using it for your own projects, then chances are you need to deploy it to a server. In this article, you can see how to deploy the current latest stable version of Redmine to Heroku, as it sometimes can be a bit problematic. 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
I recently had the pleasure to publish my first article at Scotch.io, which is a very popular platform. It is one of the longest articles that I have written so far. It is a written tutorial on how to build a cryptocurrency site in which you can see the changes of values of BitCoin, Ethereum and NasDaq overtime. The project accompanying this article is developed with Ruby on Rails using Test-Driven Development (TDD). Continue reading
Comma Separated Values (CSV) files represent some commonly used files. You may have a CSV file generated from a report generated, and then you may need to write a Ruby method or task to insert it into the database. Continue reading
I recently had to upload an image to an API endpoint in Rails, and did not found that much material online, so I decided to write this article describing how I managed to do this.
I was building an API that had to interact with an authentication micro service, where the request parameter was a Multipart image of a user file that should then be encoded in base 64 and get uploaded to AWS. Continue reading
The ability to rapidly develop new features in your Rails applications with a lot of cool gems gives you the opportunity to be very productive. At the time of this writing, 14,821,263,017 Ruby gems have been downloaded, which represents a really large number of developers who have fortunately been able to use open source gems of other fellow developers in their applications. Acts as Votable is no exception.
Rails is one of the most popular web development frameworks. For those who do not know, it represents a compilation of many commonly used programming libraries written in Ruby, and that comes with the pattern of convention over configuration. In other words, it saves you a lot of time by avoiding the need to repeat the same initial procedures of setting up a project and so you only need to start implementing the business logic. Continue reading
CarrierWave is a Ruby gem that provides a really easy way to upload files from Ruby applications. UploadCare is similar to it, but with a small difference: When you upload an image using UploadCare, then you will receive a CDN (Content Delivery Network) URL, which will be saved in your database.
One of the core pillars of motivation is having the opportunity to use some form of autonomy at the work that you do. Ruby programming language allows you to do just that with a lot of its built-in features. It gives you the ability to override methods of basic built-in classes, methods and also attributes. One such attribute in which we will focus on this article is the ability to change the default new line delimiter. Continue reading