Hi,
I am very fresh to ruby on rails so maybe I am missing something very
obvious, but anyway. How do I put serialized data into fixture.
I have a class Board which is somewhat a very complex class. It occupies
more than one line when converted to yaml. Here is the example of what I
have been doing and what failed so far.
Board is false
one:
id: 1
board: |
<%= Board.new.to_yaml.gsub(/\n/,"\n ")
Board is false
one:
id: 1
board: |
<%= Board.new.to_yaml.gsub(/\n/,"\n ").gsub /$/, " " %>
For now I stick with manual converting but the serialized object is
about 100 lines and looks plain ugly. So maybe there is a way to put a
serialized object in fixture