we will handle these callbacks through gem

bundle install….

in your routes.rb

now make a file stripe.rb in config/initializers/stripe.rb

The initial setups for the project needs the basic things like bootstrap and j-query to make it work people spend a lot of their time on it i will show you quick guide to do this.

Create rails app:

after that run this command:

This will install all the dependencies.

add these to your application.js

make src folder in javascript/packs and inside it make a file application.scss and write this

go to your environment.js file

putt this code in it and you are good to go with your rails basic setups with bootstrap and j-query.

how you can restrict request that is coming on your application throw ip addresses. only allowed ip addresses can access the application. here i am showing example how to restrict request for active admin.

here is the class that used to check ip is white listed or not. WhiteListedIp is my model.

when i call class name (WhiteListedIps) the rails automatically call matches? self method its rails api.

while working with ror as back-end and react.js as a front-end. i came cross the problem where i have to reload page every time i made change to any react component. so i dig up and came cross the solution.

gem install foreman

by this gem we will able to run both server at the same time. one for rails and one for web-packer as react.

after installation. go to your app root directory and make a name file with name Procfile without any extension

write these two commands in the file.

this will start your server on localhost:5000

if you want to shorten your ruby path you can simply do:

this will change status/monitoring_status URL to only status with default json format.

you can also use outside controller action in other namespace!

this will call monitoring_status action from status controller that is outside the namespace of api. but the url will be temper as its inside the api/v1/status controller

ALI mughal


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store