Skip to content

Commit

Permalink
Added warning that running meta_demo.rb can break other things.
Browse files Browse the repository at this point in the history
  • Loading branch information
Monty Williams committed Apr 15, 2011
1 parent 9b7f01d commit 2e7cd9e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions meta_demo.rb
Expand Up @@ -5,6 +5,12 @@
# Purpose: Define a simple class that uses ActiveModel::Validations
# so WebTools can observe the methods generated by ActiveModel.
#
# WARNING: Running WebTools is safe, BUT RUNNING meta_demo.rb IS NOT!!!
# It unsafely persists rubygems, active_model and active_support
# in a state that will have unintended consequences. If you
# run it, you should run "maglev force-reload" afterwards to
# load an empty database.
#
# Usage: maglev-ruby -Mcommit meta_demo.rb
# or
# rake meta
Expand All @@ -21,9 +27,9 @@

class AValidPerson
include ActiveModel::Validations

validates_presence_of :first_name, :last_name

attr_accessor :first_name, :last_name
def initialize(first_name, last_name)
@first_name, @last_name = first_name, last_name
Expand Down

0 comments on commit 2e7cd9e

Please sign in to comment.