Search Results

Search found 2 results on 1 pages for 'user275729'.

Page 1/1 | 1 

  • ActionMailer execution timeout

    - by user275729
    When trying to send an email to the user for reseting their password, I keep getting an execution timed out error. Other mailer functions work, so I know that the config settings are correct. The header reads: "Timeout::Error in Password resetsController#create" Here is the password_resets_controller: def create @user = User.find_by_email(params[:email]) if @user User.deliver_password_reset_instructions(@user.id) flash[:notice] = "Instructions to reset your password have been emailed to you. " + "Please check your email." redirect_to '/' else flash[:notice] = "No user was found with that email address" render :action => :new end end Here is the method inside of User.rb def self.deliver_password_reset_instructions(user_id) user = User.find(user_id) user.reset_perishable_token! Emailer.deliver_password_reset_instructions(user) end Finally, here is the actual method inside of emailer.rb: default_url_options[:host] = "http://0.0.0.0:3000" #development def password_reset_instructions(user) @subject = "FanGamb Password Reset" @from = '[email protected]' @recipients = user.email @sent_on = Time.now @body["edit_password_reset_url"] = edit_password_reset_url(user.perishable_token) @headers["X-SMTPAPI"] = "{\"category\" : \"Password Recovery\"}"#send grid category header end Why is "Password" in the error message referred to causing a timeout::error

    Read the article

  • Obtaining ActiveRecords if NOT nil

    - by user275729
    I would like to be able to gather all records in a table where the user_id is not null. This is what I have but it doesn't seem to be working (even though I've had it working in a seperate project): named_scope :all_registered, :conditions => ["user_id != ?", nil]

    Read the article

1