Module: Caterpillar::Helpers::Portlet
- Included in:
- Liferay
- Defined in:
- lib/caterpillar/helpers/portlet.rb
Instance Method Summary collapse
-
#ajax_response(params = {}) ⇒ Object
Send the rendered page in a file to serveResource method.
-
#get_namespace ⇒ Object
Set instance variable @namespace.
-
#namespace_cookie ⇒ Object
Get portlet namespace from cookie set by rails-portlet.
Instance Method Details
#ajax_response(params = {}) ⇒ Object
Send the rendered page in a file to serveResource method
28 29 30 31 32 33 34 35 36 |
# File 'lib/caterpillar/helpers/portlet.rb', line 28 def ajax_response params = {} if params[:template] content = render_to_string :template => params[:template] else content = render_to_string end send_data resposta, :type => 'text/html', :filename => "content_#{request.[:id]}.html" end |
#get_namespace ⇒ Object
Set instance variable @namespace
22 23 24 |
# File 'lib/caterpillar/helpers/portlet.rb', line 22 def get_namespace @namespace = end |
#namespace_cookie ⇒ Object
Get portlet namespace from cookie set by rails-portlet
17 18 19 |
# File 'lib/caterpillar/helpers/portlet.rb', line 17 def [:Portlet_namespace] end |