Class: Wee::Nitro::HtmlCanvasRenderer

Inherits:
HtmlCanvasRenderer show all
Defined in:
lib/wee/adaptors/nitro.rb

Instance Attribute Summary

Attributes inherited from HtmlCanvasRenderer

#document

Attributes inherited from Renderer

#current_component, #rendering_context

Instance Method Summary collapse

Methods inherited from HtmlCanvasRenderer

#anchor, #bold, #break, #check_box, #encode_text, #file_upload, generic_single_tag, generic_tag, #hidden_input, #image, #image_button, #initialize, #input, #javascript, #label, #link_css, #multiline_text, #new_radio_group, #option, #page, #paragraph, #radio_button, #register_callback, #register_named_callback, #render, #select_list, #space, #submit_button, #table, #table_data, #table_header, #table_row, #template, #text, #text_area, #text_input, #url_for_callback, #url_for_callback_id, #url_for_named_callback

Methods included from CanvasMixin

#close, #initialize_canvas, #nest, #set_brush

Methods inherited from Renderer

#close, #initialize

Constructor Details

This class inherits a constructor from Wee::HtmlCanvasRenderer

Instance Method Details

#build_url(hash = {}) ⇒ Object



51
52
53
54
55
56
57
58
59
60
61
62
# File 'lib/wee/adaptors/nitro.rb', line 51

def build_url(hash={})
  cid = hash[:callback_id]
  controller = rendering_context.context.controller_name
  
  url = ""
  url << "/#{ controller }" if controller
  url << "/callback"
  url << "?__c=#{ rendering_context.component_name }"
  url << "&__a=#{ rendering_context.redirect_action }" if rendering_context.redirect_action 
  url << "&#{ cid }" if cid
  url
end

#form(*args, &block) ⇒ Object



47
48
49
# File 'lib/wee/adaptors/nitro.rb', line 47

def form(*args, &block)
  handle(Wee::Nitro::FormTag.new, *args, &block)
end