0

I'm trying to render the following in my controller:

User-agent: *
Disallow: /

Currently it looks like this:

User-agent: *Disallow: /

def robots
  output = "User-agent: *\nDisallow: /"   #this is wrong I know...
  render text: output
end

How can I include the newline character?

Dave Schweisguth
  • 36,475
  • 10
  • 98
  • 121
Blankman
  • 259,732
  • 324
  • 769
  • 1,199

1 Answers1

1

Make sure that you use double quotes render :text => "User-agent: *\nDisallow: /"

Jim Edelstein
  • 792
  • 6
  • 10