Vipin
Vipin

Reputation: 121

How to change url using Routes

enter image description hereI am new in rails, my routes file code is below

  namespace :railsapp do
    namespace :v1 do
      get "instapi" => "instapi"
    end
  end

this is working fine using below url http://localhost:3000/api/v1/instapi

I want to change in url like http://localhost:3000/api/v1/instagram

Upvotes: 1

Views: 153

Answers (1)

nesiseka
nesiseka

Reputation: 1318

  namespace :railsapp do
    namespace :v1 do
      get "instagram" => "instapi"
    end
  end

Upvotes: 1

Related Questions