Here’s a problem I have. I have a table inside my database which
contains ruby/rails code snippets. When I use rake db:fixtures:load and
it starts to import my snippets table it starts evaluating the code
snippets inside the table which breaks the rake operation.
Here’s a problem I have. I have a table inside my database which
contains ruby/rails code snippets. When I use rake db:fixtures:load
and
it starts to import my snippets table it starts evaluating the code
snippets inside the table which breaks the rake operation.
Huh? Code in fields in the database will never get run unless you’ve
written something to run it!
Can you show some of your code and give some example data?
Here’s a problem I have. I have a table inside my database which
contains ruby/rails code snippets. When I use rake db:fixtures:load
and it starts to import my snippets table it starts evaluating the
code snippets inside the table which breaks the rake operation.
fixtures files are yaml files which can contain ruby code. this lets
you do things like have a database.yml with conditional configuration
based on the user, etc. as a guess (i haven’t worked with this), the
problem lies there, and you’ll need to come up with a way to
appropriately escape the code.
-faisal
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.