mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
25 lines
443 B
Ruby
25 lines
443 B
Ruby
class Admin::DomainsController < ApplicationController
|
|
before_action :set_domain, only: [:show]
|
|
|
|
def new
|
|
@domain = Domain.new
|
|
end
|
|
|
|
def create
|
|
end
|
|
|
|
def index
|
|
@q = Domain.search(params[:q])
|
|
@domains = @q.result.page(params[:page])
|
|
end
|
|
|
|
private
|
|
|
|
def set_domain
|
|
@domain = Domain.find(params[:id])
|
|
end
|
|
|
|
def domain_params
|
|
params.require(:domain).permit(:name, :period, :registrar, :owner_contact)
|
|
end
|
|
end
|