Class EmailPagePortlet
In: app/portlets/email_page_portlet.rb
Parent: Portlet

Methods

deliver   render  

Public Instance methods

[Source]

    # File app/portlets/email_page_portlet.rb, line 11
11:   def deliver
12:     message = EmailMessage.new(params[:email_message])
13:     message.subject = self.subject
14:     message.body = "#{params[:email_page_portlet_url]}\n\n#{message.body}"    
15:     if message.save
16:       url_for_success
17:     else
18:       store_params_in_flash
19:       store_errors_in_flash(message.errors)
20:       url_for_failure
21:     end
22:   end

[Source]

   # File app/portlets/email_page_portlet.rb, line 3
3:   def render
4:     pmap = flash[instance_name] || params
5:     @email_message = EmailMessage.new pmap[:email_message]
6:     @email_message.errors.add_from_hash flash["#{instance_name}_errors"]
7:     @email_page_portlet_url = pmap[:email_page_portlet_url] || request.request_uri
8:   end

[Validate]