Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1299888
hosts_controller.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Nov 19, 3:54 AM
Size
660 B
Mime Type
text/x-ruby
Expires
Fri, Nov 21, 3:54 AM (1 d, 14 h)
Engine
blob
Format
Raw Data
Handle
294488
Attached To
rARCHIVING archiving
hosts_controller.rb
View Options
class
Admin
::
HostsController
<
Admin
::
BaseController
before_action
:fetch_host
,
only
:
[
:verify
,
:set_quota
]
# GET /admin/hosts/unverified
def
unverified
@hosts
=
Host
.
unverified
end
# POST /admin/hosts/1/verify
def
verify
@host
.
verify
(
current_user
.
id
)
redirect_to
unverified_admin_hosts_path
end
# PUT /admin/hosts/1/set_quota
def
set_quota
@host
.
quota
=
params
[
:host
][
:quota
]
if
@host
.
save
flash
[
:success
]
=
'Changes saved'
else
flash
[
:error
]
=
'Changes not saved'
end
redirect_to
admin_client_path
(
@host
.
client
)
end
private
def
fetch_host
@host
=
Host
.
find
(
params
[
:id
]
)
end
end
Event Timeline
Log In to Comment