Sha256: 6fd6b531c6e383cd8e8c0fceb1860d46f7a69d3588d68af0a14649351b984197
Contents?: true
Size: 466 Bytes
Versions: 56
Compression:
Stored size: 466 Bytes
Contents
# frozen_string_literal: true module Decidim module Pages # Command that gets called whenever a feature's page has to be created. It # usually happens as a callback when the feature itself is created. class CreatePage < Rectify::Command def initialize(feature) @feature = feature end def call @page = Page.new(feature: @feature) @page.save ? broadcast(:ok) : broadcast(:invalid) end end end end
Version data entries
56 entries across 56 versions & 2 rubygems