On Jan 24, 2011, at 7:26 PM, Henry H wrote:

> So I took this:
> 
> class ActivitiesController < ApplicationController
> 
>  hobo_model_controller
> 
>  auto_actions :all
> 
>  def index
>    hobo_index current_user.activities
>  end
> end
> 
> and changed it to this:
> 
> class ActivitiesController < ApplicationController
> 
>  hobo_model_controller
>  auto_actions_for :user, [:index, :create, :new]
> 
> end
> 
> Now the activities tab is not clickable and I cannot get to the
> activity index page.  If I type in the URL directly it goes to a blank
> page.
> 
> So now if I change it to:
> 
> class ActivitiesController < ApplicationController
> 
>  hobo_model_controller
> 
>  auto_actions :all
>  auto_actions_for :user, [:index, :create, :new]
> 
> end
> 
> The tab is now clickable but I get all activities for everyone, not
> the ones owned by the user.  Perhaps I'm missing something, but I'm
> pretty new to Hobo so that is a possibility.  As it stands now, it
> doesn't look like the auto_actions_for :user works the way I described
> at the beginning of this thread. 


The trick is that auto_actions_for :user creates a different set of routes - 
check 'rake routes' to see what I mean. The controller will do what you're 
expecting if you go to:

/users/:user_id/activities

The issue (as you've noted above) is that this routing doesn't get picked up by 
some of the Rapid stuff.

--Matt Jones

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to