This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| gem "rails", "6.1.0.rc1" | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Including this module should let us check an instance to see if a particular | |
| # method is redundant and can be removed. Redundant methods return the same result | |
| # as the same method defined by a superclass or inherited module | |
| module RedundancyChecker | |
| def check_redundant_method(meth) | |
| result = if self.class.method_defined?(meth, false) | |
| [{class_name: self.class, result: send(meth)}] | |
| else | |
| [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Answer < ApplicationRecord | |
| has_one :answer_open, dependent: :destroy | |
| has_one :answer_rating, dependent: :destroy | |
| accepts_nested_attributes_for :answer_open, reject_if: :all_blank | |
| accepts_nested_attributes_for :answer_rating, reject_if: :all_blank | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # config/deploy/templates/database.yml.template | |
| default: &default | |
| adapter: postgresql | |
| encoding: unicode | |
| pool: 5 | |
| <%= db_stage %>: | |
| <<: *default | |
| host: localhost | |
| database: <%= db_name %> | |
| username: <%= db_user %> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # WIP | |
| AllCops: | |
| Include: | |
| - '**/Rakefile' | |
| - '**/config.ru' | |
| Exclude: | |
| - 'db/**/*' | |
| - 'bin/**/*' | |
| - 'config/**/*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Quick extension to bootstrap grid system to allow for a column | |
| to occupy one fifth of a row (i.e. five columns in a row). | |
| */ | |
| $col-5th-width: 12 / 5; // 1/5 of 12 = 2.4 | |
| // SMALL | |
| .col-sm-5th { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require "action_mailer" | |
| options = { | |
| # The name of this project / repository | |
| # to be used in the emailed notifications | |
| project_name: "My Development Project", | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Add the following to .profile | |
| # | |
| # From the command line, watch style.scss by running: | |
| # $ watchstyle | |
| # | |
| # Watch style.scss AND REQUIRE BOOTSTRAP by running: | |
| # $ watchstyle bootstrap | |
| watchstyle(){ | |
| echo "Watching ./style.scss --> style.css" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* This generates no CSS output by itself */ | |
| @mixin zeroed { | |
| margin: 0; | |
| padding: 0; | |
| list-style: none; | |
| li { | |
| margin: 0; | |
| padding: 0; |
NewerOlder