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 only way I could get the
behavior I was looking for was with the following code:
class ActivitiesController < ApplicationController
hobo_model_controller
auto_actions :all
def index
hobo_index current_user.activities
end
end
All this code is copy/pasted so if there is something wrong in the
code it would also show up in this post.
On Jan 23, 6:52 pm, kevinpfromnm <[email protected]> wrote:
> do you have it as ': owner' or ' :owner'? also, you have to tell it which
> auto actions I believe, so something like:
>
> auto_actions_for :owner, [:index, :new, :create]
--
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.