79088948

Date: 2024-10-15 08:10:22
Score: 0.5
Natty:
Report link

You should check partial existing somewhere before view, for example in controller

ALLOWED_STATES = [].freeze

before_action :check_partial_for_rendering

def check_partial_for_rendering
  return if state.in?(ALLOWED_STATES)

  # here you can return error, or raise error, or anything
end
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Anton Bogdanov