Frage

I have this code in my route.

get '/custom_page/:name' => 'custom_page#load_content'

and in my controller is there any way i could get the value of this :name. Pls help. If my question is dumb please be sorry. I not so experienced in Rails

War es hilfreich?

Lösung

You can access it by

params[:name]

I'm not very sure about this but it's worth giving a try

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top