views:

26

answers:

1
def inside_rack_middelware
  MyModel.update_attributes(:ip => request.ip)
  redirect somewhere else
end

is that possible?

A: 

got the answear via @supercoco9 on twitter, "if your middleware is in a rack/rails stack you can use the models directly via AR"

Christian