Sha256: ec606da8466ef59a39a0a66761b362d244020d7a8717a823c696f2b8cf2866c0

Contents?: true

Size: 986 Bytes

Versions: 5

Compression:

Stored size: 986 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

5 entries across 5 versions & 1 rubygems

Version Path
sketchily-1.1.0 lib/sketchily/sketchily.rb~
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