Sha256: 3c4d56fe85fc709f41e7f35a85c964498c8583e856b7cfec41729b3c8055c417
Contents?: true
Size: 517 Bytes
Versions: 9
Compression:
Stored size: 517 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( title: @feature.name, feature: @feature ) @page.save ? broadcast(:ok) : broadcast(:invalid) end end end end
Version data entries
9 entries across 9 versions & 2 rubygems