mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
19 lines
420 B
Ruby
19 lines
420 B
Ruby
class Client::ContactVersionsController < ClientController
|
|
before_action :set_version, only: [:show]
|
|
|
|
def index
|
|
@versions = ContactVersion.registrar_events(current_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
|