Permalink
Browse files

stashing these here.

  • Loading branch information...
clayallsopp committed Oct 30, 2012
1 parent 087e47c commit d7f68e9ee8f4e15224520215aa1dadcc197fa90c
Showing with 20 additions and 0 deletions.
  1. +10 −0 lib/formotion/row/row.rb
  2. +10 −0 lib/formotion/row_constraint/mutate_constraint.rb
View
@@ -76,6 +76,16 @@ class Row < Formotion::Base
]
PROPERTIES.each {|prop|
attr_accessor prop
+
+=begin
+ define_method "visible_#{prop}" do
+ self.constraint_objects.select { |c|
+ c.applied_to? :properties
+ }.map { |c|
+ c.apply(prop)
+ } && true
+ end
+=end
}
BOOLEAN_PROPERTIES = [:secure, :indented, :deletable, :remove_on_delete]
BOOLEAN_PROPERTIES.each { |prop|
@@ -0,0 +1,10 @@
+module Formotion
+ module RowConstraint
+ class MutateConstraint < Base
+ # Mutates a property of a row
+ # EX when the value of row :user_name is "Clay",
+ # change the title of this row to "Hello Clay"
+
+ end
+ end
+end

0 comments on commit d7f68e9

Please sign in to comment.