Sha256: e647fcc54b62ad77d236fdbc923de713e88a70e54de3cc7ee88e9cc3d698cc73
Contents?: true
Size: 444 Bytes
Versions: 15
Compression:
Stored size: 444 Bytes
Contents
module Blogo class UpdatePostService < BasePostService attr_reader :post def initialize(post, params) @post = post @tags_string = params.delete(:tags_string) @post_attrs = params end def update! assign_attributes return false unless @post.valid? @post.transaction do clear_tags! set_tags!(@tags_string) @post.save! end true end end end
Version data entries
15 entries across 15 versions & 1 rubygems