Addsy
Addsy

Reputation: 4054

How to generate documentation with Yard for Rails views?

I have just started using Yard to generate my docs and whilst it works great for my models and controllers, I can't seem to get it to generate anything for the views

I've tried a variety of different ways to get it to work. Currently I've set up a rake task to generate the docs that looks something like this

YARD::Rake::YardocTask.new do |t|
    t.files   = ['lib/**/*.rb', 'app/**/*.rb', 'app/views/**/*.erb']
    t.options = []
end

The last path there, I believe, should get it to include my views but when I look at the docs, there's no mention of any of these files at all. Any ideas why?

Cheers

Upvotes: 6

Views: 1826

Answers (1)

Simone Carletti
Simone Carletti

Reputation: 176472

Template files are not expected to contain Ruby methods or business logic. What kind of documentation would you like to generate?

Upvotes: 0

Related Questions