Class: Decidim::Blogs::PostForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Blogs::PostForm
- Includes:
- AttachmentAttributes, HasTaxonomyFormAttributes, HasUploadValidations, TranslatableAttributes
- Defined in:
- app/forms/decidim/blogs/post_form.rb
Overview
This class holds a Form to update pages from Decidim’s admin panel.
Instance Method Summary collapse
Instance Method Details
#author ⇒ Object
34 35 36 37 38 39 |
# File 'app/forms/decidim/blogs/post_form.rb', line 34 def @author ||= Decidim::UserBaseEntity.find_by( organization: current_organization, id: ) end |
#map_model(model) ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/forms/decidim/blogs/post_form.rb', line 26 def map_model(model) presenter = PostPresenter.new(model) self.title = presenter.title self.body = presenter.body self.documents = model. end |