Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cannot effectively link to a method in the same class #61

Closed
alanhogan opened this Issue · 2 comments

2 participants

@alanhogan

Given code like:

class FooController < ApplicationController

  # The intention here is to detect any problems with the requested URL before
  # it is loaded in an iframe (see FooController#preview).
  def preview_init
    # work... 
  end

  # This fetches a remote page and prepares it for viewing in an iframe.
  def preview
    # work...
  end
end

The outputting documentation for default_init will indeed link to FooController#preview, but clicking it merely expands the source for preview_init.

It seems that the click handler needs to check to see if the event.target is actually a link, in which case it should not do anything, and allow the default action to proceed.

@drbrain
Owner

Fixed!

@drbrain drbrain closed this
@alanhogan

Cheers, @drbrain. Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.