tests: sign in admin for user controller tests

This does mean we need to add tests that will not allow non-admins
to mess users. But for now, this passes the tests.

Signed-off-by: Zeljko <zeljko@zwr.fi>
allow non-admins show in AdminController

This does mean that we will need to randomize the ids at
some points, but this allows non-registred and non-admins
to view single user, if they know her id.

Signed-off-by: Zeljko <zeljko@zwr.fi>
fix: allow name set/change for devise routes

Devise performs sanitation on posted parameters to
at most email and password. We want to allow user to set
and change her name as well.

Signed-off-by: Zeljko <zeljko@zwr.fi>
events, scaffold and assoc to users

Basic scaffold for events, with added HABTM association
to user. User has events, but event has masters!

Signed-off-by: Zeljko <zeljko@zwr.fi>
use only date for event dates

Table uses date and time, which is not itself wrong, but we
are displaying and using only dates for events. Competitions
and races can also have time.

Signed-off-by: Zeljko <zeljko@zwr.fi>
seed events

Signed-off-by: Zeljko <zeljko@zwr.fi>
master controller

The purpose of master controller is to provide uniformed access to
each of the resources commonly used, such as Events, Competitions,
Races etc. All of those can be viewed one at the time, but only
events can be listed. In other words, you cannot just get all
applications for all competitions in all races - as well as
you cannot list all users.

But you can see your own applications!

Signed-off-by: Zeljko <zeljko@zwr.fi>
competition format

This could have been a constant, but will make it easier
to setup associations this way. There is currently only
one CF, and there will be only several in the beginning.

Each will apply the flow and will have to have some
corresponding code. For instance, in the case of 'two
races combined', controller for the competition should show
standings (and sort) based on the combined times of both races.

Signed-off-by: Zeljko <zeljko@zwr.fi>
race format

This could have also been a constant, but this will make it
easier to manage. Competition format implies which race formats
are used in each race.

Signed-off-by: Zeljko <zeljko@zwr.fi>