I'm creating a custom index action (select) in my projects controller per below.
class ProjectsController < ApplicationController
hobo_model_controller
auto_actions :all#, :except => :index
auto_actions_for :organization, [:index, :create, :new]
index_action :select do
session[:project] = params[:id]
@current_project = nil
set_current_values
partial "projects"
end
def show
hobo_show do
@current_project = nil
set_current_values
end
end
end
The purpose is to set a session param and return a partial back to the page. however when ever I trigger the update I get the following error
ActionController::RoutingError (No route matches "/projects/select"):
Which I'm finding quite confusing because rake routes shows the following in the list of routes
select_projects GET /projects/select(.:format) {:action=>"select", :controller=>"projects"}
Any hints on what might be going wrong here would be appreciated.
Thanks Bob