Skip to main content

Ruby on rails

12th October, 2022

Updated: 12th October, 2022

    Exporting to CSV in rails

    https://dev.to/victorhazbun/export-records-to-csv-files-with-rails-2778 https://testsuite.io/build-export-to-csv-with-rails

    Ruby and Docker

    gem query --local gem list | grep bundler

    how to use a specific gem version

    bundler _2.3.17_ update webpacker

    docker-compose build --no-cache

    docker-compose --verbose up --force-recreate

    What is the difference between a symbol and a string

    String:

    def update
      @book = Book.find(params[:id])
      if @book.update(book_params)
        redirect_to(@book)
      else
        render "edit"
      end
    end

    Symbol:

    def update
      @book = Book.find(params[:id])
      if @book.update(book_params)
        redirect_to(@book)
      else
        render :edit
      end
    end

    29aa4ba6-ccb1-4461-a81b-92bb8dd6718f

    Created on: 12th October, 2022

    Last updated: 12th October, 2022

    Tagged With: