Skip to content

Commit e4ef182

Browse files
committed
Move method to where it's used
This is only relevant to the projects controller, so there's no need to have it in the shared controller
1 parent 5215472 commit e4ef182

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

app/controllers/api/scratch/projects_controller.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,10 @@ def move_pending_scratch_upload_to_remix(pending_upload, remix_project)
9797
rescue ActiveRecord::RecordNotUnique
9898
pending_upload.destroy!
9999
end
100+
101+
def load_project
102+
@project = Project.find_by!(identifier: params[:id], project_type: Project::Types::CODE_EDITOR_SCRATCH)
103+
end
100104
end
101105
end
102106
end

app/controllers/api/scratch/scratch_controller.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ def can_use_scratch?
1111

1212
raise ActiveRecord::RecordNotFound, 'Not Found'
1313
end
14-
15-
def load_project
16-
@project = Project.find_by!(identifier: params[:id], project_type: Project::Types::CODE_EDITOR_SCRATCH)
17-
end
1814
end
1915
end
2016
end

0 commit comments

Comments
 (0)