[Rails] Re: Re: Re: Email using ruby on rails

2010-03-18 Thread Manish Belsare
Why don't you send emails using gmail account ? Sir, I would surely like to know what i have to make changes in the environment.rb file.. My email information is available in the development.log file.. Sir my environment.rb file has foll contents: ActionMailer::Base.delivery_method =

[Rails] Re: Re: Email using ruby on rails

2010-03-17 Thread Manish Belsare
You'll also want to change the address and domain to fit your needs. If you don't know, ask your IT department, or your ISP, or your webhost. Sir for your above mentioned thing well is it necessary to know the domain and address from my ISP?? i cant send an email from my application without

[Rails] Re: Email section

2010-03-12 Thread Manish Belsare
class EmailController ApplicationController include ProfileHelper before_filter :protect, :only = [ correspond ] def remind @title = Mail me my login information if param_posted?(:user) email = params[:user][:email] user = User.find_by_email(email) if user

[Rails] Re: Email section

2010-03-12 Thread Manish Belsare
class UserMailer ActionMailer::Base def reminder(user) @subject = 'Your login information at KnowledgeEngine.com' @body = {} #Give body access to the user information. @body[user] = user @recipients = user.email @from = 'KnowldegeEngine

[Rails] Email using ruby on rails

2010-03-12 Thread Manish Belsare
ActionMailer::Base.server_settings = { :address = smtp.tutorialspoint.com, :port = 25, :domain = tutorialspoint.com, :authentication = :login, :user_name = username, :password = password, } Here in this code what shud be the value of username and password -- Posted via

[Rails] Re: Email section

2010-03-10 Thread Manish Belsare
Sir for the following suggestion it works well.. config.action_mailer.smtp_settings But wen i further implement it.. It givs the following error: getaddrinfo: Temporary failure in name resolution Application Trace: /usr/lib/ruby/1.8/net/protocol.rb:206:in `initialize'

[Rails] Re: Email section

2010-03-10 Thread Manish Belsare
def remind @title = Mail me my login information if param_posted?(:user) email = params[:user][:email] user = User.find_by_email(email) if user UserMailer.deliver_reminder(user) flash[:notice] = Login information was sent. redirect_to :action =

[Rails] Email section

2010-03-09 Thread Manish Belsare
Sir , I want to implement email section in ma web application.. so i found the method 'server_setting' for it... Following is the method: config.action_mailer.server_settings = { :address = smtp.gmail.com , :port = 25, :domain = gmail.com , :authentication = :login, :user_name = manish

[Rails] Fixnum problem

2010-03-07 Thread Manish Belsare
Sir can i know what is the meaning of the phrase 'comparison of Fixnum with nil failed' I want to pass two parameters to a method in a model file.. bt wen i pass an integer then it gives the above error.. Please help.. -- Posted via http://www.ruby-forum.com/. -- You received this message

[Rails] Re: Fixnum problem

2010-03-07 Thread Manish Belsare
Sir i have now tried to declare a same method twice with a different name but the same parameter to both the methods.. Bt i still get that fixnum problem.. i want to know that calling two different name methods in on Model file works.? how to resolve that error? -- Posted via

[Rails] searching method.

2010-03-06 Thread Manish Belsare
def search if params[:q] query = params[:q] # First find the user hits... @users = User.find_by_contents(query, :limit = :all) # ...then the subhits. personals = Personal.find_by_contents(query, :limit = :all) #flash[:notice] = personals.size faqs =

[Rails] Searching by tag

2010-03-04 Thread Manish Belsare
Hello sir, i hav implemented a web application in which a user posts a question and the answer will be provided by an EXPERT who has logged in.. The question posted wil hav tag,title and ques_string.. now i want to implement a search method so that the user can search a question based on the tag

[Rails] How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
% if logged_in? and post.match?(post.id) % %= $n = post.id % %= link_to Answer this Query!, :controller = answers, :action = new, :idd = post.id % Hello sir, In the example given above, i am calling a new method to answer the query submitted

[Rails] Re: How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
Sir basically i want the idd from the link_to part i.e wen i click the Answer this query! link then the browser will redirect to: http://0.0.0.0:3000/answers/new?idd=9 now i want the idd = 9 to be assinged to the @post or even a query like @post = Post.find(params[:id]) will do.. bt i dont know

[Rails] Re: How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
Sir even i want to know where does the id in the link : http://0.0.0.0:3000/answers/new?idd=9 is available.. Can i get this id in any variable whem i reach that page(action) so that i can access it and compare in a loop as i hav already got an array of id's in instance variable.. So on

[Rails] Re: Re: How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
!DOCTYPE HTML PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html head titlePost your Answer Here!/title link href=/stylesheets/site.css?1267104655 media=screen rel=stylesheet type=text/css / link href=/stylesheets/profile.css?1267104655

[Rails] Re: Re: How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
Processing AnswersController#new (for 127.0.0.1 at 2010-02-28 19:21:26) [GET] Parameters: {idd=9} [4;35;1mQuestion Load (0.5ms) [0m[0mSELECT * FROM `questions` WHERE (questions.id = 0) ORDER BY questions.id ASC LIMIT 1000 [0m yes sir i get dat idd = 9 in the development.log file.. bt

[Rails] Re: Re: Re: How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
@pp = Post.find(params[:idd]) flash[:notice] = Question: + @pp.question_id sir when i do this it says cannot convert Fixnum into String.. Can u help me in resolving this problem? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the

[Rails] Re: Re: Re: Re: How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
before_filter :protect, :load_post private def load_post id=session[:user_id] Question.find_each do |@que| if(@que.user_id == id) # id is user id @que_id = #...@que.id} #que_id is question_id break end end #flash[:notice] =

[Rails] Re: Re: Re: Re: How to access id passed to link_to function in controller?

2010-02-28 Thread Manish Belsare
Sir, i want to know does only 'params[:idd]' give the same id that was passed? Or i need to do Post.find([params[:idd]) and then contiune? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post

[Rails] AJAX Problem

2010-02-19 Thread manish belsare
try { Element.hide(add_answer_link_for_post_-613772418); Element.update(new_answer_form_for_post_-613772418, form action=\/answers\ method=\post\ onsubmit=\new Ajax.Request('/answers', {asynchronous:true, evalScripts:true, parameters:Form.serialize(this)}); return false;\\nfieldset\n legendNew

[Rails] Re: Ajax

2010-02-18 Thread Manish Belsare
Sir, Can u please help me in the problem that is present at the top?? I dont know why ruby isnt supporting AJAX calls??? wat should i do 2 eliminate the problem...It is urgent...! Please help.. -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to

[Rails] Re: Ajax

2010-02-18 Thread Manish Belsare
def new @answer = Answer.new respond_to do |format| format.js do render :update do |page| page.hide add_answer_link_for_post...@post.id} page.replace_html new_answer_form_for_post...@post.id}, :partial = new end end end end

[Rails] AJAX

2010-02-18 Thread manish belsare
def new @answer = Answer.new respond_to do |format| format.js do render :update do |page| page.hide add_answer_link_for_post...@post.id} page.replace_html new_answer_form_for_post...@post.id}, :partial = new end end end end

[Rails] Ajax

2010-02-17 Thread Manish Belsare
Sir can u guide me in implementation of Ajax calls in Ruby and Rails? wen i m implementing a new page it gives th following op: try { Element.hide(add_answer_link_for_post_-613772418); Element.update(new_answer_form_for_post_-613772418, form action=\/answers\ method=\post\ onsubmit=\new

[Rails] Paginator

2010-01-31 Thread Manish Belsare
hey i m getting an error wen i do da paginating stuff..can u help meh? n it says ActionController does not contain 'super' method.. bt books say its valid..y? Error: uninitialized constant ApplicationController::Paginator RAILS_ROOT: /root/knowledge_engine Application Trace | Framework Trace |

[Rails] How to begin coding with RoR

2010-01-12 Thread Manish Belsare
Hey m doin a project on web application..I need 2 know how to start with the coding using Rails framework? Can anyone provide me with a sample code to accept values from the user in a text field and display the values below the accepted values when he clicks the OK button? -- Posted via

[Rails] How to begin with developing of a web application using Ruby on Rails

2010-01-11 Thread manish belsare
hey i want to do a web application project using RoR and MySQL... can u guide me how to begin with the proj...? I hav done basic applications mentioned on technetra.com. I juzz need ur help nw relating to how to begin with project using Rails Framework.. Waiting for ur reply... Thanking you! --