Problems while moving to a new-alike method


I have a licenses controller. Other than a new method, i have a
new_trial_license method.

The link implementation for the new_trial_license method looks like:

<%= link_to ‘New Trial license’, :action => “new_trial_license” %>

The link shows up as i expected

But it causes some error when i try to move to the page.
The traceback is:

ActiveRecord::RecordNotFound in LicensesController#show

Couldn’t find License with ID=new_trial_license

RAILS_ROOT: /home/vimal/Projects/license_manager/
Application Trace | Framework Trace | Full Trace

base.rb:1528:in find_one' /usr/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/active_record/ base.rb:1511:in find_from_ids’
base.rb:590:in find' app/controllers/licenses_controller.rb:22:in show’

Vimal Das

On Jul 24, 8:32 am, vimal [email protected] wrote:

If you are useing restful routes (ie you have map.resources :licenses
in routes.rb) then you need to add this new action to routes.rb (see
map.resources’ :collection option)


Thanks Fred :slight_smile:

Vimal Das