Skip to content

Commit

Permalink
RTO-35842 Code refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnaeverestengineering committed Nov 14, 2024
1 parent ac071b7 commit 28897d7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
11 changes: 2 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
FROM ruby:2.7.8-slim
FROM ruby:2.3-slim


RUN apt-get update -y && \
apt-get install -y --no-install-recommends \
build-essential \
git \
libffi-dev \
gcc \
make
RUN apt-get update -y && apt-get install -y git

WORKDIR /app
ADD . .
Expand Down
7 changes: 3 additions & 4 deletions lib/moodle_rb/courses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@ def create(params)
end

def show(*id)
ids = id.each_with_index
.to_h
.invert
.transform_keys(&:to_s)
ids = id.map.with_index do |item, idx|
[idx.to_s, item]
end.to_h

response = self.class.post(
'/webservice/rest/server.php',
Expand Down

0 comments on commit 28897d7

Please sign in to comment.