mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Contextual panels in domain show
This commit is contained in:
parent
7f26c8c769
commit
df5da8dc4b
4 changed files with 25 additions and 9 deletions
|
@ -6,7 +6,11 @@ class Admin::DomainsController < ApplicationController
|
|||
end
|
||||
|
||||
def create
|
||||
@domain = Domain.new(domain_params)
|
||||
@domain = Domain.new({
|
||||
valid_from: Date.today,
|
||||
valid_to: Date.today + 1.year,
|
||||
registered_at: Time.zone.now
|
||||
}.merge(domain_params))
|
||||
|
||||
if @domain.save
|
||||
redirect_to [:admin, @domain]
|
||||
|
@ -20,6 +24,10 @@ class Admin::DomainsController < ApplicationController
|
|||
@domains = @q.result.page(params[:page])
|
||||
end
|
||||
|
||||
def show
|
||||
@domain.all_dependencies_valid?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_domain
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue