Commenting out Code

Does any one know how to comment out code in a controller (.rb file)

Thanks,
Yng

I actually need to know how to add a comment to the end of a line… any
insight?

yngwie wrote:

Does any one know how to comment out code in a controller (.rb file)

Thanks,
Yng

yngwie wrote:

I actually need to know how to add a comment to the end of a line… any
insight?

yngwie wrote:

Does any one know how to comment out code in a controller (.rb file)

Comments in Ruby start with a # character and run to the end of the
line.


Philip R.
http://tzinfo.rubyforge.org/ – DST-aware timezone library for Ruby

Also, you can comment multiple lines like this:

def action
=begin
can’t see me!

=end
end

but I do believe that the “=” has to be the first character on the line.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs