Class: ActionView::Helpers::JavaScriptElementProxy

Inherits:
JavaScriptProxy
  • Object
show all
Defined in:
lib/jrails.rb

Overview

:nodoc:

Instance Method Summary collapse

Constructor Details

#initialize(generator, id) ⇒ JavaScriptElementProxy

Returns a new instance of JavaScriptElementProxy.



156
157
158
159
# File 'lib/jrails.rb', line 156

def initialize(generator, id)
  @id = id
  super(generator, "$(\"##{id}\")")
end

Instance Method Details

#replace(*options_for_render) ⇒ Object



165
166
167
# File 'lib/jrails.rb', line 165

def replace(*options_for_render)
  call 'replaceWith', @generator.send(:render, *options_for_render)
end

#replace_html(*options_for_render) ⇒ Object



161
162
163
# File 'lib/jrails.rb', line 161

def replace_html(*options_for_render)
  call 'html', @generator.send(:render, *options_for_render)
end