24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/lolita-editable-list.rb', line 24
def render_with_lolita_editable(options = {}, locals = {}, &block)
if defined?(lolita_mapping)
model = lolita_mapping.class_name.constantize
if model.lolita.list.editable?
if options[:partial] =~ /^\/components\/lolita\/list\/([a-z_]+)$/
if %w(body_cell display row).include?($1)
options[:partial] = "/components/lolita/list/editable/#{$1}"
end
end
end
end
render_without_lolita_editable(options, locals, &block)
end
|