Posts

Showing posts from December, 2022

Rails 7 Features :: Comparison with Rails 6 and Rails 5

Rails 7 Features :: Link ::    https://medium.com/geekculture/whats-new-in-rails-7-b97d44eecdb2 What's new in Rails 7 :: 1. Webpack and node is not required  2. Encrypted Database Layer  3. Asynchronous Querying 4. Applications would only run in Asychronous Querying  5. Ujs and Turbolink is now replaced Stimulous and Turbo 6. Inline your query with single record using sole  7. Use controller actions to the streamed generated file  8. Named Variant .............................................................................................................................. Whats new in Rails -6 :: Note :: In Rails 6 many things we extract from the basecamp  Link ::    https://www.cuelogic.com/blog/whats-new-in-rails-6 1. Action Mailbox  2. Action Text 3. Parellel Testing  4. Action Cable Testing  5. Webpack  ....................................... Rails -6 Features :: Link :::    https://www.toptal.com/r...

form for and form with

 ............................................................................................................................................. <%= form_with model: product do |f| %> <div> <%= f.label :name %> <%= f.text_field :name %><br> <% product.errors.full_messages_for(:name).each do |message| %> <div><%= message %></div> <% end %> </div> <div> <%= f.label :price %> <%= f.text_field :price %><br> <% product.errors.full_messages_for(:price).each do |message| %> <div><%= message %></div> <% end %> </div> <div> <%= f.label :desciption%> <%= f.text_field :description %><br> <% product.errors.full_messages_for(:description).each do |message| %> <div><%= message %></div> <% end %> </div> <div> <%= f.submit %> </div> <% end %> ......................

Using images with webpacker and assets pipeline in rails -6

 https://dev.to/shivashankarror/rails-6-using-images-with-webpacker-and-asset-pipeline-4gk3

error in razor pay when add the gem of razor pay and sometimes saved the credentials :: ctiveSupport::MessageEncryptor::InvalidMessage (ActiveSupport::MessageEncryptor::InvalidMessage)

  error in razor pay when add the gem of razor pay and sometimes saved the credentials ::  ActiveSupport::MessageEncryptor::InvalidMessage (ActiveSupport::MessageEncryptor::InvalidMessage) Solution :: $ rm -rf config/credentials.yml.enc $ EDITOR="mate --wait" bin/rails credentials:edit

ecommerce application new from scratch

$ rails g model Category name:string description:string $ rails g model Product name:string price:decimal active:boolean category_id:integer description:text $ rails g model CartItem product_id:integer order_id:integer unit_price:string quantity:integer total_price:decimal  $  rails g Order 

process

devise laga liya becrypt kaga liya jwt laga liya 

Active admin algakar dekho

All queries and examples in the record with ::: join , include and where

Dev Tools

 :: Here everything about the dev tools ::                                   ..................................................................................................................  All details , links and anything with dev tools : all the information is present at here :: Link ( All seperate videoes and tutorials )  ::   https://developer.chrome.com/docs/devtools/       Link ::    https://nira.com/chrome-developer-tools/ Link ::   https://developer.chrome.com/docs/devtools/open/ Link ::    https://developer.chrome.com/docs/devtools/overview/ Link ::  https://developer.chrome.com/blog Link ::   https://developer.mozilla.org/en-US/docs/Learn/Common_questions/What_are_browser_developer_tools Most imp  link :: https://www.geeksforgeeks.org/9-features-of-chrome-developer-tools-that-you-must-know/ The tabs are: E...

create accounts and keys have with you with different accounts you use multiple times

 stripe razor pay twilio and  different others 

sign up and sign in with authentication in new rails application

 used this link first to create the application ::: Main Links :: https://www.section.io/engineering-education/how-to-setup-user-authentication-from-scratch-with-rails-6/ ................................... 1. $ rails g controller welcome index --skip routes 2. $ rails g model User email:string password_digest:string  3. Add  'has_secure_password' and validations :: inside the model User.rb :: class User < ApplicationRecord has_secure_password validates :email, presence: true, uniqueness: true, format: { with: /\A[^@\s]+@[^@\s]+\z/, message: 'Invalid email' } end 4.  $   touch app/controllers/registrations_controller.rb 5.$  touch app/controllers/sessions_controller.rb 6.$ touch app/controllers/password_controller.rb Note :: What does session do ?? 1. session  stores data for one request and used in another request. Note :: What does Registration Controller do ?? This controller is responsible for creating a new user and saving it to...