Is it possible to use sql during the construction of an ActiveRecord object?
For example,
@user = User.new
@user.name = params[:name]
@user.via_sql.id = `select count(1) from users`
@user.save
This is just a silly example, but I need to deal with a concurrency problem.
I'd like to be able to do this so I can still use ActiveRecord callbacks.