On Jan 7, 2010, at 3:23 PM, François Beausoleil wrote:

Hey Matt, thanks for replying.

I added some debug code in my view.  #can_edit? returns false, and
#object_url return nil.

I added my controller code to:

https://gist.github.com/ 596e7e9992f42fba9b2d#file_app_controllers_people_controller.rb

And that resolved my issue: I was under impression that #auto_actions
should be called with an :except for the methods we're going to
redefine.  I thought Hobo would look at #instance_methods, not
#auto_actions, to determine which actions are really available.

It's supposed to. Was the typo in the Gist (the 'update' method is defined as 'udate') in the original source, or was that an accident while cleaning things up to post?

can_edit? returning false is a little weird - what user are you logged in as when that happens? Here's the chain of calls from can_edit?:

- can_edit? calls this.editable_by?(current_user, nil)
  - this.editable_by? calls:
- viewable_by?(current_user, nil), which your code indicates will always be true
    - edit_permitted?(nil), with the acting user set
      - which calls update_permitted?, which *should* be returning true

So I'm stumped as to why it'd end up returning false at any point...

--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