Skip to content

Instantly share code, notes, and snippets.

# We can get application class by
>> Rails.application.class.name
# => "Meetup::Application"
## Since we are only interested in application name, we can get it by
>> Rails.application.class.module_parent.name
# => "Meetup"
@NotGrm
NotGrm / gist.md
Created June 15, 2023 21:25 — forked from mmcgrana/gist.md

HTTP API Design Guide

(Copy of internal Heroku document for sharing with collaborators.)

Introduction

This guide describes the design of RESTful HTTP+JSON APIs conforming to Heroku’s API conventions. It’s based on our design work for the Heroku Platform API.

This guide informs additions to that API and also guides new internal APIs at Heroku. We hope it’s also of interest to API designers outside of Heroku.

@NotGrm
NotGrm / .gitconfig
Created October 18, 2019 15:10
Git IncludeIf example
[includeIf "gitdir:~/dev/personal/**/*.git"]
path = ~/dev/personal/.gitconfig_include
@NotGrm
NotGrm / show.js
Created June 13, 2017 07:18
EmberJS action to add multiple user to a department. Not Working
addMembers() {
const { department, selected } = this.getProperties('department', 'selected');
Ember.RSVP.all(
selected.map((user) => {
if(!Ember.isNone(user.get('department'))) {
user.get('department').then((old) => {
old.get('members').removeObject(user);
old.save();
@NotGrm
NotGrm / Active li
Created December 17, 2014 13:19
Ember Snippets
{{#link-to "dashboard" tagName="li" href=false}}
<a {{bind-attr href="view.href"}}>
Dashboard
</a>
{{/link-to}}