Add web app model, service to fetch metadata
This commit is contained in:
9
app/models/app_catalog/web_app.rb
Normal file
9
app/models/app_catalog/web_app.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
class AppCatalog::WebApp < ApplicationRecord
|
||||
|
||||
store :metadata, coder: JSON
|
||||
|
||||
validates :url, presence: true, uniqueness: true
|
||||
validates :url, format: { with: URI.regexp },
|
||||
if: Proc.new { |a| a.url.present? }
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user