Sha256: bb2adf2d2b7d91e692440b4744a9a29fdd94dc145d5db7ee00c169834019d47d

Contents?: true

Size: 656 Bytes

Versions: 3

Compression:

Stored size: 656 Bytes

Contents

#!/usr/bin/env ruby

$LOAD_PATH << './'
$LOAD_PATH << './lib'

require 'spec/require_helper'

address_attributes = {
  street: 'street',
  city: 'city'
}

p = PostWithCommentsAndAddressForm.new(address_attributes: address_attributes)

a = AddressForm.new(post_attributes: { title: 'asd', body: 'body' })


params = {
  post: {
    title: 'First post',
    body: 'post body',
    comments_attributes: {
      "0" => { body: "body1" },
      "1" => { body: "body2" }
    }
  }
}

post_form = PostForm::Base.new(params[:post])
post_form.save


post_form = PostForm::Base.new(comments_attributes: { '1' => { id: 1, body: '1', _destroy: true } })


binding.pry

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
object_attorney-2.10.12 console.rb
object_attorney-2.10.11 console.rb
object_attorney-2.10.10 console.rb