Sha256: 18b8b5d0f553b5f43f6a83ded231caf205ff18595833ca65be696df29a6204a9

Contents?: true

Size: 985 Bytes

Versions: 8

Compression:

Stored size: 985 Bytes

Contents

module Sketchily
  module FormBuilderInstanceMethods
    def sketchily(method, options = {})
      Sketchily.render(:partial => "sketchily/sketchily",
        :locals => {:template => @template, :object_name => @object_name,
                    :method => method, :options => objectify_options(options)}).html_safe
    end

    def svg_edit(method, options = {})
      sketchily(method, options)
    end
  end

  module ActionViewBaseInstanceMethods
    def sketchily(object_name, method, options = {})
      Sketchily.render(:partial => "sketchily/sketchily",
        :locals => {:template => self, :object_name => object_name,
                    :method => method, :options => options}).html_safe
    end

    def svg_edit(object_name, method, options = {})
      sketchily(object_name, method, options)
    end
  end
end

ActionView::Helpers::FormBuilder.send :include, Sketchily::FormBuilderInstanceMethods
ActionView::Base.send :include, Sketchily::ActionViewBaseInstanceMethods

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sketchily-1.0.3 lib/sketchily/sketchily.rb~
sketchily-1.0.2 lib/sketchily/sketchily.rb~
sketchily-1.0.1 lib/sketchily/sketchily.rb~
sketchily-1.0.0 lib/sketchily/sketchily.rb~
sketchily-0.3.0 lib/sketchily/sketchily.rb
sketchily-0.2.0 lib/sketchily/sketchily.rb
sketchily-0.1.0 lib/sketchily/sketchily.rb
sketchily-0.0.2 lib/sketchily/sketchily.rb