Project

pg_rails

0.0
The project is in a healthy, maintained state
Rails goodies.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 3.2.2
~> 0.6.3
~> 4.9.3
~> 1.12.0
~> 1.3.0
~> 3.1.0
~> 4.0.2
~> 1.2.2
~> 1.7.0
~> 1.2.14
~> 1.16
~> 2.3
~> 1.5.4
~> 2.3.6
~> 6.4
~> 2.3.1
~> 7.0.8
~> 3.1.1
~> 5.1
~> 3.5.1
~> 2.4.0
~> 5.3.0
~> 3.6.3
= 1.5.1
~> 5.7.0
~> 2.8.1
~> 7.2.0
~> 4.2.1
~> 8.8
 Project Readme

CircleCI Maintainability Test Coverage

PgRails

Plugin de Programando para Rails

Installation

Add this line to your application's Gemfile:

gem 'pg_rails', git: 'https://github.com/programandoarg/pg_rails.git', ref: '<commit hash>'

And then execute:

$ bundle

Uso

AsociaciĆ³n creable

f.asociacion_creable(campo, index_url, new_url, opciones)

Opciones:

  • label: Texto para la label o false para que no haya label

Ejemplo:

= pg_form_for(@cosa) do |f|
  = f.asociacion_creable(:categoria_de_cosa, categoria_de_cosas_url, new_categoria_de_cosa_url, crear_asociado: true)

Contributing

Setup

  1. Ingresar a la consola de postgres:
sudo -u postgres psql template1
  1. Crear el rol
create role pgrails password 'pgrails' login superuser;
  1. Ejecutar el script bin/setup. This script will:
  • Check you have the required Ruby version
  • Install dependencies using Bundler
  • Create a .env.development file
  • Create, migrate, and seed the database

Testear y ejecutar

  1. Instalar overcommit: gem install overcommit
  2. Correr los linters con overcommit -r
  3. Correr los tests con bundle exec rspec
  4. Instalar foreman: gem install foreman
  5. cd spec/dummy
  6. foreman start

Acceder a la app en http://localhost:3000/.

Regenerar modelos dummy

cd spec/dummy

  1. bundle exec rails d pg_scaffold Admin/Cosa
  2. bundle exec rails d pg_scaffold Admin/CategoriaDeCosa
  3. Borrar policies
  4. bundle exec rails g pg_scaffold Admin/CategoriaDeCosa nombre:string{required} "tipo:integer{enum,required}" fecha:date tiempo:datetime --model-name=CategoriaDeCosa --discard --activeadmin
  5. bundle exec rails g pg_scaffold Admin/Cosa nombre:string{required} "tipo:integer{enum,required}" categoria_de_cosa:references{required} --model-name=Cosa --discard --activeadmin
  6. Setup asociacion creable en cosas/_form

be rake app:pg_engine_engine:install:migrations

be rails pg_engine_engine:install:migrations

"build": "esbuild pg_rails/js/index.js --bundle --sourcemap --format=esm --outdir=pg_rails/builds --public-path=/assets",
"build:css:compile": "sass ./pg_rails/scss/pg_rails.scss:./pg_rails/builds/application.css --no-source-map --load-path=node_modules",
"build:css:prefix": "postcss ./pg_rails/builds/application.css --use=autoprefixer --output=./pg_rails/builds/application.css",
"build:css": "yarn build:css:compile && yarn build:css:prefix",

ruby-vips pdftoppm

atributos no pueden terminar en _text