lib/knj/knjdb/revision.rb in knjrbfw-0.0.27 vs lib/knj/knjdb/revision.rb in knjrbfw-0.0.28

- old
+ new

@@ -6,10 +6,13 @@ #This method checks if certain rows are present in a table based on a hash. def rows_init(args) db = args["db"] table = args["table"] + raise "No db given." if !db + raise "No table given." if !table + args["rows"].each do |row_data| if row_data["find_by"] find_by = row_data["find_by"] elsif row_data["data"] find_by = row_data["data"] @@ -254,10 +257,10 @@ if table_data["on_create_after"] table_data["on_create_after"].call("db" => db, "table_name" => table_name, "table_data" => table_data) end - self.rows_init("table" => table_obj, "rows" => table_data["rows"]) if table_data["rows"] + self.rows_init("db" => db, "table" => table_obj, "rows" => table_data["rows"]) if table_data["rows"] end rescue Knj::Errors::Retry retry end end \ No newline at end of file