daily pastebin goal
14%
SHARE
TWEET

Untitled

a guest Jul 12th, 2018 51 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. RuntimeError in Referrals#invite_friends
  2.  
  3. Showing app/views/referrals/index.html.haml where line #15 raised:
  4.  
  5. Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id
  6.  
  7. Extracted source (around line #15):
  8.  
  9. 12:     %p
  10. 13:    
  11. 14:    
  12. 15:     - semantic_form_for @referral , :url => {:controller => 'referrals' , :action => 'invite_friends' }do |form|
  13. 16:       - form.inputs :name => '' do
  14. 17:         = form.error_messages
  15. 18:         = select_tag "referraljs[][title]", "<option>Herr</option><option>Frau</option>"
  16.  
  17.  
  18. controller:
  19.  
  20.  def invite_friends
  21.     begin
  22.   Referral.transaction do
  23.  
  24.     params[:referraljs].each { |p| Referral.create!(p.merge(:user_id => current_user.id, :message => object_params[:message]  )) }
  25.   end
  26. rescue
  27.  
  28.   render(:action => 'index')
  29.  
  30. end
  31.  
  32.  
  33.  
  34.  
  35. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top