Together with the lovely Ruby Monstas and Travis Foundation I’ve been working on a Ruby on Rails App since July 2015. At diversitytickets.org conferences can offer free tickets, travel grants or accommodation for their event to minority groups like women in tech.

diversitytickets.org screenshot

The minimal version is done, the app is ready to use. Organizers can submit their events, these events have to be approved by the admin to be visible to the public. After an event is approved people can apply for tickets. After the deadline the admin will select the winners.
The App is hosted on Heroku. It has a PostgreSQL database. It uses Minitest for testing, mailing via Mandrill. And it has a really cool design (done by Justine).

Concerning code, we have some fancy little things in it, for example

1) Joining all validation errors for one attribute to one line:

def join_messages(messages)
  *head, tail = messages
  [head.join(", "), tail].reject { |s| s.blank? }.join(" and ")
end
<% if @application.errors.any? %>
  <div class="error">
    <p><%= pluralize(@application.errors.count, "error") %> stopped this
    application from being saved:</p>
    <ul>
      <% @application.errors.messages.each do |field, messages| %>
        <li><%= @application.class.human_attribute_name(field) %> <%=
            join_messages(messages) %></li>
      <% end %>
    </ul>
  </div>
<% end %>

2) A custom form builder, that will add a * to every field that is required:

def form_field(field_type, attribute, name, options = {})
  css_classes = options.delete(:class) || []
  css_classes << 'form_field'
  if @object.class.validators_on(attribute).any? { |v| v.kind == :presence }
    css_classes << 'required'
  end

  @template.content_tag(:div, class: css_classes) do
    label(attribute, name) + send(field_type, attribute,
      objectify_options(options))
  end
end
div.required label:after {
  content: " *";
}
<%= f.form_field :text_field, :name, 'Name' %>
<%= f.form_field :text_field, :website, 'Website',
      placeholder: "e.g. https://myconference.com" %>

And many more cool things.

There is still a lot to do to improve the app, some issues are

  • At the moment organizers can not edit their events once they submitted them. We already started implementing a user model so organizers can then manage their own events.
  • The selection process is not implemented, also emailing to applicants once they were selected or not.
  • We started doing direct s3 upload, to include the event logos.

I am really proud to be a part of this.
Visit the Website or check out the GitHub repo.