Is Anyone working with Ruby....

Hi friends,
Is anyone working with ruby on rails... If so can you please tell me about the language and its uses... i am the beginner of ruby... Is anyone done any project in ruby... reply me if so.. thanks... ๐Ÿ˜€

Replies

  • Kaustubh Katdare
    Kaustubh Katdare
    Ruby takes all the great features from languages like PERL, C++, Java etc. Equally important is the rails framework with is known for rapid web app development framework.

    Do you have any specific questions?
  • karthie
    karthie
    Hi,
    I have done time keeping application in ruby. Using net bean IDE to run rails. In that application i generate mailer to send forgot password to the user's mail id. when i click forgot password and type email id and send it. It will not sending the forgotten password to the mail. can you tell the solution. Thanks. ๐Ÿ˜€
  • Kaustubh Katdare
    Kaustubh Katdare
    Mind posting the relevant code here? It will help the rest of us debug your code ๐Ÿ˜€
  • karthie
    karthie
    Hi,
    I have generated mailer named "notification",

    class Notifications < ActionMailer::Base
      def forgot_password(to, login, pass, sent_at = Time.now)
        @subject    = "Your password is ..."
        @body['login']=login
        @body['pass']=pass
        @recipients = to
        @from       = 'support@yourdomain.com'
        @sent_on    = sent_at
        headers    = {}
      end
    end
    
    
    *And also i have generated model named "user", in that i have defined send_new_password function,
    
     def send_new_password
        new_pass = User.random_string(10)
        self.password = self.password_confirmation = new_pass
        self.save
        Notifications.deliver_forgot_password(self.email, self.login, new_pass)
      end
    
    *In controller,
    
     def forgot_password
        if request.post?
          u= User.find_by_email(params[:user][:email])
          if u and u.send_new_password
            flash[:message]  = "A new password has been sent by email."
            redirect_to :action=>'login', :id=>@user.id
          else
            flash[:warning]  = "Couldn't send password"
          end
        end
      end
    *when i enter the email id and submit, the password had been changed and it's not received in my mail. When i relogin using that old password it's not login in. Thats the problem. can u tell me the solution. thanks.....
  • Sanjeev Jaiswal
    Sanjeev Jaiswal
    #-Link-Snipped-# Please write Perl or perl but never use PERL keyword to represent Perl programming.
    FYI: #-Link-Snipped-#

You are reading an archived discussion.

Related Posts

CEans, We are happy to release CE Badges for your websites & blogs. The procedure to add the badge to your site is very simple: Just copy the code given...
CEans, All discussions / questions / feedback / suggestions and showcase - this is the thread ๐Ÿ˜€ The announcement is available here - https://www.crazyengineers.com/forum/announcements/6906-ce-badges-your-blog-website.html

hi

hi frns! ๐Ÿ˜
Hello, friends I m final year ele. engg. student. i study in pune uni. I Want small but logical project.
CEans, As I hear the news that efforts are being made to bring the cost of laptops to under $100, I am thinking if our CEans were to design such...