First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :developmentThen you'll want to rebuild your Docker container to install the gems
| The default Postgresql installation on Mac OS X using homebrew includes a single extension - plpgsql (PL/pgSQL procedural language) but there are a number of them available in the lib directory (/usr/local/Cellar/postgresql/9.2.1/lib on my machine) | |
| To install an extension into the database, the easiest way I found was to open a database console using the 'rails db' command and then create it directly. I have seen mention of doing this in a Rails migration but this did not work for me. | |
| Note that an extension is installed in a specific database, rather than being added to all databases. | |
| The command to list the installed extensions is '\dx' | |
| $ rails db | |
| psql (9.2.1) |
| params = [ | |
| { | |
| "id": "00012572000000133723", | |
| "dataRegistro": "15.03.2021", | |
| "dataVencimento": "08.06.2021", | |
| "valorOriginal": 14900, | |
| "valorPagoSacado": 344.6, | |
| "numeroConvenio": 000, | |
| "numeroOperacao": 0000, | |
| "carteiraConvenio": 17, |
| You could just make your own pg_dump directly from your Heroku database. | |
| First, get your postgres string using `heroku config:get DATABASE_URL`. | |
| Look for the Heroku Postgres url (example: `HEROKU_POSTGRESQL_RED_URL: postgres://user3123:[email protected]:6212/db982398`), which format is `postgres://<username>:<password>@<host_name>:<port>/<dbname>`. | |
| Next, run this on your command line: | |
| pg_dump --host=<host_name> --port=<port> --username=<username> --password --dbname=<dbname> > output.sql |
| // Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| import 'package:flutter/material.dart'; | |
| void main() => runApp(MyApp()); | |
| class MyApp extends StatelessWidget { |
| class StoredProcedureService | |
| def self.instance | |
| @instance ||= StoredProcedureService.new | |
| end | |
| def execute(name, *args) | |
| results = [] | |
| begin | |
| connection.execute("CALL #{name}(#{args.join(',')})").each(as: :hash, symbolize_keys: true) do |row| |
| FROM ruby:3.1.2 | |
| ARG NODE_MAJOR_VERSION=19 | |
| RUN curl -sL https://deb.nodesource.com/setup_$NODE_MAJOR_VERSION.x | bash - | |
| RUN apt-get update -qq && \ | |
| apt-get install -y build-essential libvips nodejs libpq-dev postgresql-client && \ | |
| apt-get clean && \ | |
| rm -rf /var/lib/apt/lists/* /usr/share/doc /usr/share/man && \ | |
| npm install -g yarn |
First, add pry-rails to your Gemfile:
https://github.com/rweng/pry-rails
gem 'pry-rails', group: :developmentThen you'll want to rebuild your Docker container to install the gems
Comentar no admin.js o Turbo stream
// Turbo.session.drive = false
Colocar o data para usar o turbo stream
data: { turbo_method: :delete, turbo_confirm: 'Are you sure?' }
| class Calc | |
| def sum(a, b) | |
| a + b | |
| end | |
| def multiply(a, b) | |
| a * b | |
| end | |
| end |