Reputation: 289
I have a controller method say
def my_method
@gibbon = <data needed>
render :something
end
and i have a URL say
http://exampleforme.com/example1
which returns a certain text, how to get this text inside my controller method from the URL?
I am using rails 2.8
Upvotes: 1
Views: 4480
Reputation: 42
can you show me your route file ?
but I think if you want "example1" text in url you can call params[:id] in your controller
@text = params[:id]
Upvotes: -2