Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions apps/dashboard/app/controllers/widgets_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

# The Controller to render widget templates without any layout furniture
class WidgetsController < ApplicationController

def show
widget_path = File.join('/widgets', params[:widget_path])

Expand All @@ -11,7 +10,6 @@ def show
return
end


widget_exists = lookup_context.exists?(widget_path, [], true)
unless widget_exists
render plain: "404 Widget not found: #{widget_path}", status: :not_found
Expand All @@ -25,7 +23,6 @@ def show

# Checks if the widget path contains only allowed characters
def valid_path?(widget_path)
widget_path.match?(/\A[a-zA-Z0-9_\-\/]+\z/)
widget_path.match?(%r{\A[a-zA-Z0-9_\-/]+\z})
end
end

Loading