Sha256: a3a896ec7a0b842320289dfd11b21bcdc863ef2978827858ea396b68b3b3a812
Contents?: true
Size: 465 Bytes
Versions: 8
Compression:
Stored size: 465 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
8 entries across 8 versions & 2 rubygems