3
4
5
6
7
8
9
10
11
12
13
|
# File 'lib/active_scaffold/bridges/semantic_attributes/column.rb', line 3
def initialize(name, active_record_class)
super
self.required = !active_record_class.semantic_attributes[self.name].predicates.find { |p| p.allow_empty? == false }.nil?
ignored_types = %i[required association]
active_record_class.semantic_attributes[self.name].predicates.find do |p|
sem_type = p.class.to_s.split('::')[1].underscore.to_sym
next if ignored_types.include?(sem_type)
@form_ui = sem_type
end
end
|