Sha256: ab90e1cbcd0758868c9eff0ff252c02d965a27cbb8176a840d2a517379e5cd0e
Contents?: true
Size: 790 Bytes
Versions: 5
Compression:
Stored size: 790 Bytes
Contents
class Skyline::Content::Editors::EditableListController < Skyline::Skyline2Controller helper "skyline/content" before_filter :get_classes def new @object = @source_object.send(@assoc.name).build render :update do |p| editor = Skyline::Editors::EditableList.new(["element"],@source_object,@source_klass.fields[params[:association].to_sym],@template) p.insert_html :bottom, editor.js_object_name, editor.render_row(@object) end end protected def get_classes @source_klass = @implementation.content_class(params[:source_type]) @source_object = @source_klass.find_by_id(params[:source_id]) || @source_klass.new @assoc = @source_klass.reflect_on_association(params[:association].to_sym) @target_klass = @assoc.klass end end
Version data entries
5 entries across 5 versions & 2 rubygems