2010/1/22 John Merlino <li...@ruby-forum.com>:
> I'm looking at code in a project. I have no clue what is being passed
> into the resource parameter:
>
>    def read_authorized?(resource)
>      if resource.respond_to? :user_read_authorized?
>        resource.user_read_authorized? current_user
>      else
>        true
>      end
>    end
>
> Is there any kind of debugging feature I can run to see what gets passed
> into resource in this specific instance.

Have a look at the Rails Guide on debugging then use ruby-debug to
break into the function.  Then you can inspect the variables.

Colin

>
> Also, user_read_authorized? is not defined anywhere else in application.
> Is that legal in rails? Can someone just define :user_read_authorized?
> and it mean something?
>
> Thanks for any suggestions
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-t...@googlegroups.com.
> To unsubscribe from this group, send email to 
> rubyonrails-talk+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to