Skip to content

Commit

Permalink
不要なルーティングの制限とメソッドのprivate化
Browse files Browse the repository at this point in the history
  • Loading branch information
a-terumoto-gs committed Apr 17, 2024
1 parent 7ee318b commit 641b15a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def create
redirect_to new_movie_path, alert: e.message
end

private

def generate_thumbnail_from_blob(movie_path)
thumbnail_path = Tempfile.new(['thumbnail', '.png']).path

Expand All @@ -58,8 +60,6 @@ def generate_thumbnail_from_blob(movie_path)
)
end

private

def save_blob_to_tempfile(blob)
tempfile = Tempfile.new(["#{blob.filename}.#{blob.filename.extension}", ''], 'tmp/', binmode: true)
tempfile.write(blob.download)
Expand Down
2 changes: 1 addition & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
get "thanks", to: "static_pages#thanks"
get "portfolios" => "works#index"
resource :buzz, only: %i(show edit update), controller: "buzz"
resources :movies
resources :movies, only: [:index, :show, :new, :create]
mount LetterOpenerWeb::Engine, at: "/letter_opener" if Rails.env.development?
mount GoodJob::Engine => 'good_job'
end

0 comments on commit 641b15a

Please sign in to comment.