$request = request
When I write this in controller, it will work. But if i need this variable in Model or Application controller, How can i ?
You do not have access to the request object in your models, you will have to pass the request.request_uri in.
Perhaps via a custom method. e.g. @object.custom_method_call(params, request.request_uri)
Another option would be add an attr_accessor :request_uri
in your model and set/pass that in:
@object.update_attributes(params.merge(:request_uri => request.request_uri))