Class: Admin::RobotsTxtController

Inherits:
AdminController
  • Object
show all
Defined in:
app/controllers/admin/robots_txt_controller.rb

Instance Method Summary collapse

Instance Method Details

#resetObject



15
16
17
18
# File 'app/controllers/admin/robots_txt_controller.rb', line 15

def reset
  SiteSetting.overridden_robots_txt = ""
  render json: { robots_txt: original_robots_txt, overridden: false }
end

#showObject



4
5
6
# File 'app/controllers/admin/robots_txt_controller.rb', line 4

def show
  render json: { robots_txt: current_robots_txt, overridden: @overridden }
end

#updateObject



8
9
10
11
12
13
# File 'app/controllers/admin/robots_txt_controller.rb', line 8

def update
  params.require(:robots_txt)
  SiteSetting.overridden_robots_txt = params[:robots_txt]

  render json: { robots_txt: current_robots_txt, overridden: @overridden }
end