File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 5
5
# Purpose: Define a simple class that uses ActiveModel::Validations
6
6
# so WebTools can observe the methods generated by ActiveModel.
7
7
#
8
+ # WARNING: Running WebTools is safe, BUT RUNNING meta_demo.rb IS NOT!!!
9
+ # It unsafely persists rubygems, active_model and active_support
10
+ # in a state that will have unintended consequences. If you
11
+ # run it, you should run "maglev force-reload" afterwards to
12
+ # load an empty database.
13
+ #
8
14
# Usage: maglev-ruby -Mcommit meta_demo.rb
9
15
# or
10
16
# rake meta
21
27
22
28
class AValidPerson
23
29
include ActiveModel ::Validations
24
-
30
+
25
31
validates_presence_of :first_name , :last_name
26
-
32
+
27
33
attr_accessor :first_name , :last_name
28
34
def initialize ( first_name , last_name )
29
35
@first_name , @last_name = first_name , last_name
You can’t perform that action at this time.
0 commit comments