Skip to content

Transaction inside an iteration: undefined method `defining_class' for #<Duby::AST::Block:0xc98b07> #18

@hakunin

Description

@hakunin
def run2
  5.times { |i|
    Model.transaction do
      puts "dostuff"
    end
  }    
end  

Results in

tasks/check_new_payments_task.duby:84: undefined method `defining_class' for #<Duby::AST::Block:0x91fa78>
      Model.transaction do
^^^^^^^^^^^^^^^^^^^^^^^^^^^
        puts "dostuff"
^^^^^^^^^^^^^^^^^^^^^^^
      end
^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions