Sha256: 0cf1490811e9a08f339209cf65cf35b5524c9f64eb9f28a7c037f643d5093ce9
Contents?: true
Size: 448 Bytes
Versions: 9
Compression:
Stored size: 448 Bytes
Contents
module YariiEditor module EditorHelper def add_field(type, props) render "yarii_editor/editor/#{type}", props end def name_from_variable(props) model_name = params[:content_model] "#{model_name}[#{props[:variable]}]" || "unknown#{(1..10000).to_a.sample}" end def value_from_variable(props) variable = props[:variable] if variable && @doc @doc.send(variable) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems