Rails prefix url

Hello rails!

I have a question for you and maybe I will get some help :slight_smile:

I want to prefix my url routes at the end of the url
example:
www.example.com/rails/_rb
or
www.example.com/foo/bar/_br

Any idea?

thx!

Hello,

So nobody has any clue how to solved this? :slight_smile:

On Sun, Nov 2, 2014 at 1:48 AM, Claudiu C. [email protected]
wrote:

So nobody has any clue how to solved this? :slight_smile:

Maybe nobody understands what you want to do –

I want to prefix my url routes at the end of the url

“prefix” and “at the end” are mutually exclusive.

Perhaps if you gave an example that explicitly shows the “normal”
url and the desired url to compare…

–
Hassan S. ------------------------ [email protected]

twitter: @hassan

Hello,

thx for reply

example

localhost:3000/posts/amazing-post
I want to be: localhost/amazing-post/_post
localhost:3000/cities/berlin
I want to be: localhost:3000/berlin/_city

best

On Sun, Nov 2, 2014 at 8:27 AM, Claudiu C. [email protected]
wrote:

localhost:3000/posts/amazing-post
I want to be: localhost/amazing-post/_post
localhost:3000/cities/berlin
I want to be: localhost:3000/berlin/_city

So if that’s the desired result, what is the problem? You can manually
create whatever arbitrary URLs you like.

That said, I think you’ll regret fighting Rails conventions this way :slight_smile:

Good luck!

Hassan S. ------------------------ [email protected]

twitter: @hassan

On 2 November 2014 16:27, Claudiu C. [email protected] wrote:

Hello,

thx for reply

example

localhost:3000/posts/amazing-post
I want to be: localhost/amazing-post/_post
localhost:3000/cities/berlin
I want to be: localhost:3000/berlin/_city

Have a look at the Rails Guide on routing and you will see how to use
any route you desire to invoke the appropriate controller#action. Why
on earth you would want to do what you describe is a mystery to me
however.

Colin