Skip to content

Edit app database entries

Anika Lindtner edited this page Mar 1, 2017 · 2 revisions
  • Complete/fix the record in the campaign/stripe app database, so it shows up properly on the campaign page listing, including the company avatar.

The company logo and avatar needs to be added to this directory. The sponsorship then needs to be listed in this file. The id used in the file _packages.yml is going to be used for the logo image name, and the link on the sponsors page, so it should be chosen with care. The logo and blurb will be automatically added to the site once the entry is there in the file _packages.yml, and the image can be found in img/sponsors.

If the sponsor has signed up via Stripe then a record should already exist in our database. If the sponsor wants to pay via wire transfer then we need to create the entry manually.

The record in the campaign/stripe app can be created or edited using the Heroku Ruby console:

$ heroku run console -a rgsoc-campaign

The following attributes need to be set correctly:

package
amount
name

The following attributes are technically optional, but it is good to fill in as many of them as possible/known:

email
twitter_handle # e.g. basecamp
github_handle  # e.g. basecamp
homepage       # e.g. https://www.mozilla.org
gravatar_url   # e.g. /img/sponsors/mozilla_avatar.png
comment        # text that appears on the campaign page listing as a comment

The attribute display can be set to false in order to hide the record from the listing (can be used to, for example, add a record for additional budget flowing over from last year).

Creating a record

can be done like this:

Donation.create(name: 'GitLab, Inc.', email: '[email protected]', ...)

Editing a record

can be done like this:

donation = Donation.where(name: 'GitLab, Inc.').first
donation.gravatar_url = '/img/sponsors/gitlab_avatar.png'
donation.save
Clone this wiki locally