Difference between vanilla.js, javascript, ecmascript, ember.js, node.js

Vanilla.js Vanilla.js is nothing but a name given to the practice of using plain JavaScript without any additional JavaScript libraries as a mockery to remind framework lovers that many things can be done without the need for additional JavaScript libraries. ECMAScript ECMAScript is a standard followed by JavaScript language. ECMAScript... »
Author's profile picture Rajat singla

Swap elements in dom by drag and drop.

Drag and drop is a very common feature. In which you drag an element and drop it somewhere else. Drag and drop is a standard feature in HTML5, You can make any element draggable. Below are the steps on how to achieve the same. Below is a demo of the... »
Author's profile picture Rajat singla

What are the options with which protect_with_forgery is called?

class ApplicationController < ActionController::Base # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery with: :exception end What happens if the token is missing or wrong depends on the option with which protect_from_forgery method is called. In Rails there are three... »
Author's profile picture Rajat singla

How to add csrf in ember app.

What if i’m using rails as api, so my frontend is seperated from rails can i still prevent csrf and how? So lets take an example where we use ember for frontend and rails as api. In this case, apart from adding protect_from_forgery in application controller you have to do... »
Author's profile picture Rajat singla

Sessions and csrf in rails.

Most apps need to be able to store some data about a user. Maybe it’s a user id, or a preferred language. session is the perfect place to put this kind of data. Little bits of data you want to keep around for more than one request. Sessions are easy... »
Author's profile picture Rajat singla

Best practices while using ooor gem for making rpc calls to odoo(openerp) from ruby framework

Best practices while Using Ooor gem for making rpc calls to Odoo(openerp) from ruby framework Odoo(openerp) is a management software written in python using xml and qweb engine. Odoo is all the rage for ERP back-offices, but sometimes you want freedom and scalablity for your web front ends which you... »
Author's profile picture Rajat singla

Integrate paytm payment with rails app

Paytm. The fast growing payment network, it’s quite easy to integrate paytm payment in your rails app. Here is simple step by step guide on the same. 1. Register on paytm payment website. For registering on paytm payment as a merchant you need to sign up here, you need TAN... »
Author's profile picture Rajat singla

Automated deployment on github pages using jekyll themes.

GUI to write and edit posts www.cyobb.com. I always wanted a GUI to write and edit posts with the power of github pages and flexibility of jekyll themes. So, i have created one, which automates deployment and provides a number of options right at one place all GUI. Here you... »
Author's profile picture Rajat singla

How to add inline image in gmail.

Open the image you want to add in a new tab, If it’s on drive you can use open in a new tab option. Then from this new tab drag the image to your tab where gmail is open and drop the image in compose box. »
Author's profile picture Rajat singla

Undefined method `user_confirmation_path' error with devise rails.

Common errors in devise undefined method user_confirmation_path undefined method current_user undefined method authenticate_user Common reasons for these errors Make sure your devise model’s name is user and not something like service_user. Make sure you have defined routes devise_scope :service_user do in routes.rb. You can check the same by running rake... »
Author's profile picture Rajat singla