<commit_before>module Houston
  module Scheduler
    class MilestonesController < ApplicationController
      layout "houston/scheduler/application"
      
      
      def show
        @milestone = Milestone.find(params[:id])
        @project = @milestone.project
        @tickets = @milestone.tickets
      end
      
      
      def create
        project = Project.find(params[:projectId])
        milestone = project.create_milestone!(params.pick(:name))
        if milestone.persisted?
          render json: milestone, status: :created
        else
          render json: milestone.errors, status: :unprocessable_entity
        end
      end
      
      <commit_msg>[fix] Allowed you to always navigate to a destroyed or closed milestone with its permanent URL (1m)<commit_after>module Houston
  module Scheduler
    class MilestonesController < ApplicationController
      layout "houston/scheduler/application"
      
      
      def show
        @milestone = Milestone.unscoped.find(params[:id])
        @project = @milestone.project
        @tickets = @milestone.tickets
      end
      
      
      def create
        project = Project.find(params[:projectId])
        milestone = project.create_milestone!(params.pick(:name))
        if milestone.persisted?
          render json: milestone, status: :created
        else
          render json: milestone.errors, status: :unprocessable_entity
        end
      end
      
      
{'fraction_non_alphanumeric': 0.07404844290657439, 'fraction_numerical': 0.0006920415224913495, 'mean_word_length': 2.2133333333333334, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4737633', 'n_tokens_mistral': 380, 'n_tokens_neox': 368, 'n_words': 94}