I hereby claim:
- I am choonggg on github.
- I am choonggg (https://keybase.io/choonggg) on keybase.
- I have a public key ASDQc845gwoZnZIUnDLGQCMCn2LKBYtP4RmrGFMHBEMaSAo
To claim this, I am signing this object:
# syntax = docker/dockerfile:1.2 | |
FROM timbru31/ruby-node:3.2-slim | |
ENV RAILS_LOG_TO_STDOUT=true | |
RUN --mount=type=secret,id=_env,dst=/etc/secrets/.env cat /etc/secrets/.env | |
RUN corepack enable && \ | |
corepack prepare yarn@stable --activate |
services: | |
app: | |
build: | |
context: ./ | |
dockerfile: Dockerfile.dev | |
container_name: mapp_container | |
ports: | |
- 3000:3000 | |
volumes: | |
- ./:/app |
module BoolAt | |
extend ActiveSupport::Concern | |
class_methods do | |
# Defines a bool_at DSL | |
# allows setting true false on a virtual attribute | |
# and maps to attr_at | |
def bool_at(*attrs) | |
attrs.each do |attr| | |
at_attribute = "#{attr}_at" |
services: | |
app: | |
tty: true | |
stdin_open: true | |
build: . | |
container_name: app_container | |
ports: | |
- "3000:3000" | |
user: "${UID}:${GID}" | |
volumes: |
I hereby claim:
To claim this, I am signing this object:
class ProfilesController < ApplicationController | |
def new | |
@form = ProfileForm.new(current_user) | |
end | |
def create | |
@form = ProfileForm.new(current_user, form_params) | |
# Now your form can act like a model | |
if @form.save |
class BaseForm | |
include ActiveModel::Model | |
include ActiveModel::Validations | |
def initialize(params={}) | |
super(params) | |
end | |
end |
class ProfileForm | |
# Make ProfileForm acts like a model | |
include ActiveModel::Model | |
include ActiveModel::Validations | |
attr_accessor :user, :profile | |
# This is shorthand for | |
# def user_attributes=(attribute) | |
# user.attributes = attributes |
class BaseForm | |
include ActiveModel::Model | |
include ActiveModel::Validations | |
def initialize(params={}) | |
super(params) | |
end | |
end |
// Creates a new axios instance for config | |
import axios from 'axios' | |
const instance = axios.create({ | |
baseURL: 'http://localhost:3000', | |
timeout: 1000, | |
}) | |
export default instance |