Basic history display for eedirekt users

This commit is contained in:
Andres Keskküla 2014-10-02 16:19:23 +03:00
parent b5608c1394
commit a426862aa8
6 changed files with 104 additions and 15 deletions

View file

@ -0,0 +1,19 @@
class Client::ContactVersionsController < ClientController
before_action :set_version, only: [:show]
def index
@versions = ContactVersion.registrar_events(current_user.registrar.id)
@versions.flatten!
end
def show
@event = params[:event]
@contact = @version.reify(has_one: true) unless @event == 'create'
end
private
def set_version
@version = ContactVersion.find(params[:id])
end
end