On 6 September 2015 at 15:00, tamouse pontiki <
tamous...@gmail.com> wrote:
>
> On Fri, Sep 4, 2015 at 1:21 AM, Colin Law <
cla...@gmail.com> wrote:
>>
>> On 3 September 2015 at 21:56, Priya Mohan <
mmpr...@gmail.com> wrote:
>> > 6.config/routes.rb
>> >
>> > controller 'ads' do
>> > match 'ads/:id' => :show
>> > match 'ads/:id' => :index
>> > end
>
>
>>
>> As for your specific problem it should be /ads/show/3. Also the route
>> for index should not include the id. But in routes.rb you should be
>> using resources rather than match for such cases.
>
>
> The "show" route would just be /ads/3 :
http://localhost:3000/ads/3