I hereby claim:
- I am danielsousaio on github.
- I am danielsousaio (https://keybase.io/danielsousaio) on keybase.
- I have a public key ASBSHdY_PHVEAlxi2loFuBj51dYy30Ms-eQAb6Wxgoq0EAo
To claim this, I am signing this object:
class Item < ApplicationRecord | |
has_many :groupings | |
has_many :lists, through: :groupings | |
end | |
class List < ApplicationRecord | |
has_many :groupings | |
has_many :items, through: :groupings | |
end |
en: | |
activerecord: | |
models: | |
something: | |
one: Something | |
other: Somethings | |
class Something | |
extend ActiveModel::Naming | |
end |
# models/concerns/ethnicitable.rb | |
require 'active_support/concern' | |
module Ethnicitable | |
extend ActiveSupport::Concern | |
included do | |
has_and_belongs_to_many :ethnicities | |
end |
# This can be improved by Ruby Mixins in the long run, but this is the basics overview | |
class Grouping < ActiveRecord::Base | |
# Takes a gender and queries based on it | |
scope :gender, -> (gender) { where: ... } | |
end | |
class GroupingsController < ApplicationController | |
def index | |
@groupings = Grouping.all |
# index.js.haml | |
- js = escape_javascript(page_entries_info @properties) | |
$("#results_page_entries_info").html("#{ js }"); | |
- js = escape_javascript(paginate @properties) | |
$("#results_paginate").html("#{ js }"); | |
- js = escape_javascript(render @properties) | |
$("#results_properties").html("#{ js }"); | |
# properties_controller.rb | |
class PropertiesController < ApplicationController |
I hereby claim:
To claim this, I am signing this object:
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7B11bHkQacEp+jJFTv7zahqaEnDPTcvqLzDs2YiT7p2UaNbmi5Z8JB2E9ML4Ny910UHfWIZJVrZVBddHdToQUgQsFqtZLuzWoqUMXWgZ7GQOET+cBgAiyTPgP5nUr1QNG+vUHfIABJWESRZJw1T8gZMpPxtQ4gRr6Elia1lbjSLNx8dEewVO0bWdoDbhgMkAfTVVlmZohwPH5mTVJo7q4sx/TdKKyfVWtyib3f59cjhn3A6VLeAXDuqlDKeid7/hAmrk+x6egEkdjLrD0QNXeFMjfv5jmQQEvteSNc098w1zoIOpYahcDNULkj39yrytQFZDSW0EAcr2Gg+BEOSoNybPhzmvfzxrRsU+JuhrCQ2AzhzJc+wANOrxd8QRd1t5XqDJC//cQF+BOfIf4V6FyG5TAbUKxld/CkriojDKZ3oVze+crUmM1dGLzey8zaMtybOBdE65ItarmCsSc0OgRlJhxiof4zN6JJHLyzSVqc4xsUpie/xWs/LezGxodPEz8OJsn+tWjyxP/Vo+Y+g69NTqwMUmCzeWtIujSajoNS7vh348AR1NUN6LgsBzrRMyYwgYU5qOjY8cAdfwHhAAG7VNZOGToOYz3yRrnVqqAQrbILNa3H/VtKVf8zfwC5DtcLRoUQ969JpxihlZ06qBeHkLZXCgNvjgs3MHqClixPQ== mail@danielsousa.io |
Issue: sys.exit(3) on background job that runs makemigrations - infinite loop
PR: https://github.com/crowdbotics/crowdbotics-slack-app/pull/1003
This gist proposes a solution to this issue by doing the same checks Django uses to either ask further questions during migrations creation or not. Currently our background job stays in a loop because we don't provide a valid answer to this questioner. Using the flag --no-input
isn't enough as there is still 3 scenarios that raise the questioner.
Calling makemigrations
can call either InteractiveMigrationQuestioner
or NonInteractiveMigrationQuestioner
.
{ | |
"openapi": [ | |
{ | |
"openapi": "3.0.2", | |
"info": { | |
"title": "My componentlayout1_dev_6277 API", | |
"version": "", | |
"description": "API documentation for componentlayout1_dev_6277 App" | |
}, | |
"paths": { |
let cards = { | |
Q: { colorCards: "lol", equity: 42 }, | |
A: { colorCards: "lol", equity: 42 } | |
}; | |
let defaultHand = { | |
colorCards: "AAA", | |
equity: 40 | |
}; |