Properly merged palettes_controller.rb.
Fixed authorization in order to download palettes.