Sha256: 1d829c1b889895168c61a251fcdd8196e3da00abd1cc5d60e3c7ee9e74db385d

Contents?: true

Size: 349 Bytes

Versions: 47

Compression:

Stored size: 349 Bytes

Contents

module PostWithCommentForm

  class Base < PostForm::Base

    has_many :comments, class_name: CommentForm

  end
  
  class Explicit < PostForm::Base

    def build_comment(attributes = {})
      CommentForm.new(attributes)
    end

    def existing_comments
      post.comments.map { |comment| CommentForm.new({}, comment) }
    end

  end
  
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
object_attorney-2.10.12 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.11 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.10 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.9 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.7 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.6 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.5 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.3 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.2 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.10.1 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.9.4 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.9.3 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.9.2 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.9.0 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.8.1 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.8.0 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.6.12 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.6.11 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.6.10 spec/support/form_objects/post_with_comment_form.rb
object_attorney-2.6.9 spec/support/form_objects/post_with_comment_form.rb