How can I save the destination url with all the parameters?

If I understand what you're asking, .... In your controller when you
test whether a user is logged-in or not, if they aren't logged in,
you'll want to save their current request uri in their session so that
you can later redirect them to that orig destination once they've
successfully logged in. Something like:

  # the place in your controller where you test logged-in-ness:
  if not is_user_logged_in
    session[:pre_login_req_uri] = request.env['REQUEST_URI']

  # in your login meth, after the user has successfully logged-in:
  pre_login_uri = session[:pre_login_req_uri]
  session[:pre_login_req_uri] = nil
  if pre_login_req_uri