Geordee Naliyath
Geordee Naliyath

Reputation: 1859

Rails - Find index, new, edit path from controller or instance

I have been DRYing up the code for a Rails project. Is it possible to find the index, new and edit path from the controller name or from the object/collection?

Upvotes: 1

Views: 1014

Answers (1)

Geordee Naliyath
Geordee Naliyath

Reputation: 1859

I had to search a little more to get the solution.

Answering this question myself and linking it to an existing SO question.

Ruby on Rails : get route using controller, action & param

Upvotes: 1

Related Questions