[Facebooker-talk] Problems with *_path() and *_url() helpers when using Publisher

Nick Holland nick.a.holland at gmail.com
Sat Apr 5 17:47:53 EDT 2008


Hello!

Thanks for the response Mike and Nicholaus. I apologize for the delay
in replying, but I have been deep in development mode and deploying my
Facebook Application.

I was running an older version of Facebooker, so I thought I'd try and
upgrade my application today to the newest version. Happy to see that
a number of bugs have been fixed that I had money patches for, but I
still am experiencing some issues using *_path() style paths in
partials under the Publisher framework.

There has been a change in the errors I receive, though. I do not
receive the previous error "undefined method `default_url_options' for
ActionView::Base:Class", anymore. There is a path returned, but it is
relative. I attempted modifying my code to use ":only_path => false"
in my _path method call, to see if I'd receive a full, absolute URL
with my application path. Unfortunately, I receive an exception which
was caught by my event processor:

"Missing host to link to! Please provide :host parameter or set
default_url_options[:host]"

I took a look in the publisher code and see that default_url_options
method is indeed defined and looks right. Just for laughs, I copied
this decleration into my own publisher class, to see if it would work.
I still receive the same error.

It looks like we are getting closer to solving the problem. I hope one
of you with some more intimaacy with this framework could assist me,
as currently I have to build all my publisher URLs in my partials
manually as strings (yuck!).

Thanks for your assistance, I greatly appreciate it!

- Nick

On Thu, Apr 3, 2008 at 1:28 PM, Nicholaus Ames
<nicholaus.l.ames at gmail.com> wrote:
> Nick,
>  Did you ever get the url_helpers in there?
>
>  Nick
>
>
>
>  On Sun, Mar 30, 2008 at 10:26 PM, Nick Holland <nick.a.holland at gmail.com> wrote:
>  > Hello,
>  >
>  >  I am running into issues using *_path() and *_url() helpers the
>  >  Facebooker Publisher framework. I encounter the following error when
>  >  using these helpers while *inside of a partial*:
>  >
>  >  undefined method `default_url_options' for ActionView::Base:Class
>  >
>  >  I've seen a few other people speak about this issue, yet I haven't
>  >  seen any resolution on the mailing list yet. Here is an example stub
>  >  method that I am using the partial in:
>  >
>  >   def simple_notification(event_data, partial_name)
>  >     send_as :notification
>  >     from event_data[:user]
>  >     recipients event_data[:target_uids]
>  >     fbml render(:partial => "event/notification/" + partial_name,
>  >  :event => event_data[:event])
>  >   end
>  >
>  >  Note, _path() and _url() helpers work flawlessly from the
>  >  simple_notification method's context, but fails miserably inside the
>  >  partial. I assume this issue also exists with asset helpers.
>  >
>  >  Any ideas? Am I missing something?
>  >
>  >  Thanks,
>  >  Nick Holland.
>
>
> >  _______________________________________________
>  >  Facebooker-talk mailing list
>  >  Facebooker-talk at rubyforge.org
>  >  http://rubyforge.org/mailman/listinfo/facebooker-talk
>  >
>
>
>
>  --
>  Nicholaus Ames
>  503-544-5813
>  ri.niculo.us
>


More information about the Facebooker-talk mailing list