mirror of
https://github.com/internetee/registry.git
synced 2025-05-18 18:29:40 +02:00
Basic history display for eedirekt users
This commit is contained in:
parent
b5608c1394
commit
a426862aa8
6 changed files with 104 additions and 15 deletions
19
app/controllers/client/contact_versions_controller.rb
Normal file
19
app/controllers/client/contact_versions_controller.rb
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue