Archive for the ‘Ruby ON Rails (Skid Software)’ Category

Presentation of Skid Software @ India International Center Delhi

Today we had a presentation of Skid Software which is designed for the children suffering from Autism, such that they can Learn and Communicate Easily.

Major Part of the Presentation was given by Prof Arun Mehta. he explained people about Autism & how he got idea to prepare about this software & working of the skid software.

I also got chance to explain my Email Module & Text Editor.

It was a huge opportunity for me to explain my modules in front of 100 people which includes journalist from mint, Parents whose child are suffering from Autism and other Computer Experts.

I started my presentation by Telling them in brief about the Skid Software and then i Explained them that “Being Connected is the major Requirement of Today’s world”. Since the Children Suffering from Autism cannot use keyboard, so for them we have created the mail module such that the can send mail just by using Joystick or Racing wheels.

I also Explained them that this is the First Step in this Direction. No Existing Mail System like Gmail, Yahoomail etc. Provide this Facility which Autisic child can explore, so our mail module is unique in itself & it will surely help child to communicate & Learn.

Then we showed them the Live working of our module which is running at http://www.skid.org.in ( Emailaddr & Text Editor)

We also explained them that the since the child cannot remember the email-id of the persons to whom he want to send email so we had shown him the list of emailaddress to whom he can send mail.

The Response of Audience about our Skid Software was great, They were very keen to use our software.

We told them that the Skid Software is a open source software which is freely available on net people can download it using Subversion or they can use the software from site http://www.skid.org.in

Really It was Great Experience for me to be the part of the Presentation.

Advertisements

How to Send Mail with Action Mailer in Ruby on Rails

Action Mailer is the Rails component that enables applications to send and receive e-mail.

Create a New Project emails.

D:\ruby\> rails emails
this requires framework i suggest you to use Instant Rails 2.0 framework.
just by writting this command all controllers, views, models & helpers etc Automatically gets created.

Action Mailer – ConfigurationFollowing

Go into config folder of your emails project and open environment.rb file and add the following lines at the bottom of this file

config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {:address => “kunal.rubypython.playground.net”,
:port => 25,
:domain => “rubypython.playground.net”,
:authentication => :login,
:user_name => “username”,
:password => “password”,
}

Remember you should have account on Ruby On Rails Server.
Replace each hash value with proper settings for your Simple Mail Transfer Protocol (SMTP) server. You don’t need to change port number 25 and authentication type if you are using standard SMTP server

Now the Next step is to create mailer

Generate a mailer
D:\ruby\> cd emails
D:\ruby\emails> ruby script/generate mailer Emailer

This will create a file emailer.rb in app\models directory.Check the content of this file is as follows
class Emailer < ActionMailer::Base
end
Create One Method as follows:-
class Emailer < ActionMailer::Base
def contact(recipient, subject, message, sent_at = Time.now)
@subject = subject
@recipients = recipient
@from = ‘no-reply@yourdomain.com’
@sent_on = sent_at
@body[“title”] = ‘This is title’
@body[“email”] = ‘sender@yourdomain.com’
@body[“message”] = message
end
end

The contact method has four parameters a recipient, subject, message and a sent_at, which defines when the e-mail is sent.
@subject defines the e-mail subject.
@body is a Ruby hash that contains values with which you can populate the mail template. You created three key-value pairs: title, email, and message
@recipients is a list of the people to whom the message is being sent.
@from defines who the e-mail is from.
@sent_on takes the sent_at parameter and sets the timestamp of the e-mail

Now we will create a mailer template which is just text with standard Rails <%= %> placeholders scattered throughout

Put following code in app/views/contact.html.erb
(if you are using Instant Rails 2.0 or more)

or put the following code in app/views/contact.rhtml (if you are using Instant Rails version 1.7)

<%= @message %>

Now we had to create a controller for this application as follows
D:\ruby\emails> ruby script/generate controller Emailer

class EmailerController < ApplicationController
def sendmail
email = @params[“email”]
recipient = email[“recipient”]
subject = email[“subject”]
message = email[“message”]
Emailer.deliver_contact(recipient, subject, message)
return if request.xhr?
render :text => ‘Message sent successfully’
end
end

To deliver e-mail using the mailer’s contact method, you have to add deliver_ to the beginning of the method name. You add a return if request.xhr? so that you can escape to Rails Java Script (RJS) if the browser does not support JavaScript and then tell the method to render a text message.

Now The Task Is Almost done Except for creating the view part for the user.

Now let’s define our view in app\views\emails\index.html.erb
<html>
<head><title>Send Mail</title></head>
<body>
<h1>Send Email</h1>
<% form_tag ({:action => “sendmail”},{ :method=>”post”}) do-%>
<p>
<label for=”email_subject”>Subject</label>:
<%= text_field ’email’, ‘subject’ %>
</p>
<p>
<label for=”email_recipient”>Recipient</label>:
<%= text_field ’email’, ‘recipient’ %>
</p> <p><label for=”email_message”>Message</label><br/>
<%= text_area ’email’, ‘message’ %></p>
<%= submit_tag “Send” %>
<% end-%></body>
</html>
This will send your message and will display text message that “Message sent successfully”
The modified version of this Application is working in www.skid.org.in/emailaddr

Queries Are Welcomed

Presentation of Skid Software tomorrow

Hello,

From Past 6 months i’m Learning Ruby.

& from past 3.5 months i’m working under the guidance of Prof. Arun  Mehta, Managing Director Indata Pvt. Ltd.

The Skid software http://www.skid.org.in was started by prof. Arun Mehta.

Skid software is designed to help kids communicate and learn. Children who cannot speak properly, including many with cerebral palsy and autism, are denied access to a regular school, even though they could communicate in other ways, for instance using a computer. It is such other ways, that Skid explores

Somehow I got Chance to work with Arun Mehta sir in my Summer Training,

Their was a List of 5 to 6 Modules to be completed in that Summer Training.

I Decided to took the most challenging Mail Module latter joined by two more students.

so we group of three students had to complete this module.

Mail Module had to be designed in such a manner that child can send mail just by using 4 arrow keys or racing wheel.

This type of a project was a first step in that direction such that Child suffering from autism can send mail easily.

& Now Today We Have almost Completed this Mail Module by two ways

using Action Mailer in Ruby on Rails that is now running on site http://www.skid.org.in and second by using Outlook Express that will run on Client Machine because Action Mailer requires server and client machine cannot have server installed in their machine.

We are still working with Arun Sir Even our summer training was over in August.

We have also deveoped a module Text Editor which allows child to edit the text who can use keyboard little bittle this module is also available in the site.

We are still unable to add pictures to our mail module such that person suffering from Autism wouldn’t have to remember the email-id of the person to whom he want to send the mail, such that he can just select pictures and the mail would be send to that person, hope we would be able to this soon.

We are still working on the client part of the software.

u can go and try the software on http://www.skid.org.in and apart from this module there is wikipedia , Picture Editor, font module & nimb game etc .

I Would like to thank god & My parents who are supporting and encouraging me to create these modules.

I would also like to thank Prof Arun Mehta for giving me a chance and making me part of this noble mission to help these Autisic Children and helping us while creating these modules.

Btw tomorrow we are having a presentation of this skid software 6.30 P.M @ India International Center Lodhi Road.