Class: Twinkle::AppcastController

Inherits:
ApplicationController show all
Defined in:
app/controllers/twinkle/appcast_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
8
9
10
# File 'app/controllers/twinkle/appcast_controller.rb', line 3

def show
  @app = App.includes(:versions)
    .where(versions: { published: true })
    .order('versions.build DESC')
    .find_by!(slug: params[:slug])
  Event.create(app: @app, **event_params)
  render layout: false, formats: :xml
end