About Namrata Ukirde
I am ROR developer, Passionate about learning new things. Love to write poems.
All blog articles by Namrata Ukirde

Many of us have already heard about PaperTrail gem and its use for versioning of model. I found it very useful for purpose of debugging. Lets have a quick look at exactly what is PapertTrail gem and how we can use it for purpose of debugging.

PaperTrail and Versions:

  • When we add papertrail gem in our rails app and run migration for same at that time it creates Version table for us in our DB.
  • When we use it in particular model and perform any kind create, update operation on it then each time...

Read complete blog post

Namrata Ukirde

In rails one of the way to execute raw query is use of ActiveRecord::Base.connection.execute

We are going to see if we use this option to execute raw query and we are working with pg database then what result it provides and what operations can be performed on that result.

results = ActiveRecord::Base.connection.execute('select * from purposes')

It returns PG::Result object :

#<PG::Result:0x007fd5a09686d8 status=PGRES_TUPLES_OK ntuples=3 nfields=5 cmd_tuples=3>

We can...

Read complete blog post

Namrata Ukirde

Rspec has great feature and that is trait. In rspec we create factory for each class which provides the simplest set of attributes necessary to create an instance of that class. Many times we need some attributes which we do not want to add in original factory and at the same time we do not want to repeat it. In such scenario rspec trait is good option. For few attributes we need different values and we want to use it at multiple places can be another reason to use it.

Without Trait:


Read complete blog post

Many times App's rate and reviews decides app's success. Reviews by user's are important part of app and decides what are good things about our app and what improvements are needed.

Now a days its common to provide Rate & Review button or link that will redirect to app store or play store.

If we have cordova app then we can simply do it in following way using js. We can identify whether device is android or ios and accordingly open it in window.

$('#rate-app').on('click', function(e) {...

Read complete blog post

Namrata Ukirde

Sometimes tests can be hard to debug, especially when they’re running on a remote machine.This can be done with ssh enabled build with CircleCi using Debug via SSH option.

SSH can be enabled for already running build or with rebuild option.

  1. To enable SSH access for a running build, go to the ‘Debug via SSH’ tab and click the ‘Enable SSH for this build’ button. enter image description here

  2. To start a fresh build with SSH enabled, for example if you want to debug a build that has already finished, click the ‘with ssh’...

Read complete blog post

Let's assume we have route in our application:

Router.map(function() {
 this.route('category', { path: '/category/:id' });

This route has dynamic segment. Whenever application will be loaded it will create url as '/category/1' , 'category/2' etc.

What is Dynamic segment?

A dynamic segment is a section of the path for a route which will change based on the content of a page. Dynamic segments are made up of a : followed by an identifier in path.


Read complete blog post

A regular expression is a pattern describing a certain amount of text and is a type of shorthand to describe a search pattern. It can be used to find text which matches a pattern within a larger text, to replace the matching text or to split the matching text into groups. Regular expressions power of extracting specific text from documents resides in their ability to replace many lines of code with as little as one line.

Some terms used in regular expressions:

  1. Literal - A literal is any...

Read complete blog post

In our current app we are using kalendae datepicker plugin. Lately, we wanted to add a 'today' button that is visible to the user in all the datepicker popovers(used for numerous date fields throughout the app). As the name suggests on clicking this button, the current date gets selected and is displayed in the corresponding field.

Github link of kalendae - https://github.com/ChiperSoft/Kalendae

We can do this by writing function to add button in popup and then we can use it wherever we need....

Read complete blog post