mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-12 19:48:36 +00:00
* Improves ruby code in app/models/app_user.rb based on suggestions from Rubocop * Rubocop fixes for more models * Rubocop fixes for controllers
18 lines
446 B
Ruby
18 lines
446 B
Ruby
# frozen_string_literal: true
|
|
|
|
class VersionsController < ApplicationController
|
|
def create
|
|
@app = App.find params[:app_id]
|
|
name = params[:version]["versionName"]
|
|
AppVersion.create(app: @app, name: name)
|
|
end
|
|
|
|
def index
|
|
@versions = AppVersion.where(app_id: params["app_id"]).order("created_at desc")
|
|
end
|
|
|
|
def update
|
|
@version = AppVersion.find params[:id]
|
|
@version.update(definition: params[:definition])
|
|
end
|
|
end
|