vendredi 8 décembre 2017

Rails Render Index with URL Parameters

Is it possible to render a view and pass along parameters in the url?

def index
  render :index
end

I want this to open up the index page with url parameter (i.e. localhost:4000/users?id=123

I've tried doing something like render :index, id: 123, but that doesn't work. Is the only way to do this via redirect_to?

Aucun commentaire:

Enregistrer un commentaire