I seem to be having a lot of issues recently.  Here is another one:
I am trying to use view_permitted like this:
  def view_permitted?(field)
    user_is? acting_user
  end

I am trying to display a table of objects that are associated (through
a has_many) to a parent object.
The table from my view looks like this:
<table fields="memo, state" class="CodeMEM">
        <memo-heading:>
            <h3>Memo</h3>
        </memo-heading:>
        <state-heading:>
            <h3>State</h3>
        </state-heading:>
        <state-view:>
          <if test="&this == 'unsent'">
              <view class="unsent"/>
          </if>
          <else>
              <view class="sent"/>
          </else>
        </state-view:>
      </table>

With the above view_permitted the table displays no rows.
If I modify the view_permitted to simply "true" or
"acting_user.administrator?" it displays as expected.
I verified the user attribute is properly set and tested user_is? in
the console.  The same function works fine in the create_permitted
function.  Why is it not working here?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
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