Commenting rails attr_accessible fields with RDoc

111 views Asked by At

How do I add comments to an attr_accessible field in a Rails class so that it will be picked up by RDoc (or Yard). Here is my sample code, but the comment is not appearing in the generated RDoc files (though method commenting works fine):

class Stage < ActiveRecord::Base
  # [Stage] Stage sequence number, used to determine order of this Stage in relation to other Stages
  attr_accessible :sequence_number
end
1

There are 1 answers

0
Carlos Agarie On

You might pay attention to Rail's own documentation procedures about dynamically generated methods.

I don't know much about YARD, so it's possible that something in there can help you. :(