Posts

Showing posts from January, 2022

Ruby on Rails Recent Changes get ::::::::::::::: Main Official Link of Rails with Github....

https://github.com/rails/rails

import the other database in my system

 import the other database in my system  ....................................................................................... 1. downlaod database sql file in my system 2. cut paste downloaded databas sql file in my project - 3. change the name of database in database.yml and/or application.yml in test/production and development – in all three modes 4. run the command of postgres - psql -U postgres chingchingbyakon_dev8 < local_10_01_22.sql enter the password - for my system that is postgres 5. rake  db:create 6. rake  db:migrate

Indexing in Rails ::::::::::::::: https://medium.com/@mera.stackhouse/what-are-indexes-and-how-to-add-them-to-your-rails-app-dc066d538771

Image
https://medium.com/@mera.stackhouse/what-are-indexes-and-how-to-add-them-to-your-rails-app-dc066d538771 What are indexes? And how to add them to your Rails app? When dealing with databases, the subject of indexing must inevitable come up. And with any rails app, you are most likely executing many searches that would benefit from indexes. When Should We Use Them? Before we get into what they are, we can identify some areas where they will be helpful. Some things we do a lot: Rendering show and edit views — Look up a user/article/post/student attributes by a string or foreign key Logging in — Find a user by their email/username Asking about associations — Look up a project’s owner (using a join table with something other than id’s or using polymorphic associations) All of the above procedures are going through your database row by row checking the value in the appropriate column until it comes across what it’s looking for. In SQL terms, we are looking at the portion of the query doing th...

how to check stripe balance

 Stripe::Balance.retrieve

Use of Nullify in ruby on Rails

dependent destroy will delete all associated tables of the parent id but dependent nullify delete the parent id from the associated tables only.parent id column will set to null  ::     (it is pointless to have any value there because the user with that id was deleted)

Very Good Link

 https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-18-04

Postgress Commands

  Cheatsheet Link ::  https://ramiro.org/blog/postgresql-cheat-sheet-ubuntu/ r estart postgres ubuntu sudo service postgresql restart how to start psql in linux sudo service postgresql start start postgresql ubuntu sudo service postgresql start start postgres server pg_ctl -D /usr/local/var/postgres start how to run postgresql in linux sudo service postgresql-9.3 initdb Link ::  https://www.codegrepper.com/code-examples/shell/start+postgres+server+ubuntu Start the PostgreSQL server sudo service postgresql start Stop the PostgreSQL server: sudo service postgresql stop By default, the postgres user has no password and can hence only connect if ran by the postgres system user. The following command will assign it: sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';" sudo -u postgres psql -c "CREATE DATABASE testdb;" Update and install PostgreSQL 10.4 sudo apt-get update sudo apt-get install postgresql-10.4

How to Merge the Request at the builder project

  Merge Request :: Code push Create Merge Request and at the browser url :: we will send him to the Madhur sudhi he will Merge the Request