[Rails] Re: Calling a controller action from javascript

2011-03-21 Thread vishy
Anyone?? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more option

[Rails] Re: Calling a controller action from javascript

2011-03-21 Thread vishy
y.location.lat().toString(); var lng = results[0].geometry.location.lng().toString(); $.getScript("search/result.html?location=" + address); return false; }); }); On Mar 21, 6:20 am, vishy wrote: > Oops hit the send button too quickly. > > Here is the actual resu

[Rails] Re: Calling a controller action from javascript

2011-03-21 Thread vishy
Oops hit the send button too quickly. Here is the actual result.html.erb code <% @restaurants.each do |restaurant| %> <%= render 'search_result', :restaurant => restaurant%> <%= link_to 'Order Now', {:controller => "search", :action => "create_order", :id => restaurant}, :

[Rails] Re: Calling a controller action from javascript

2011-03-21 Thread vishy
quot;, :action => "create_order", :id => restaurant}, :class => "order_now_link"%> <%end%> On Mar 21, 3:25 am, Clint wrote: > Your view

[Rails] Calling a controller action from javascript

2011-03-20 Thread vishy
end But this call never gets redirected to the result.html.erb page Any help will be really appreciated. Thanks, vishy -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@goog

[Rails] Rails 3 Action Mailer issue

2010-11-08 Thread vishy
-8 Content-Transfer-Encoding: 7bit Dear xxx, Welcome Everything looks good till here. However when I receive the email, I see from email address shows as the "supp...@test.com" instead of registration-do-not-re...@test.com. Any pointers as to why that might be happening or how I ca

[Rails] Re: Performing nested queries in rails

2010-09-17 Thread vishy
Restaurant.where(:cuisine => params[:cuisine]) will return all the Restaurants that that have the cuisine. However I am trying to filter the returned results from @restaurants = Restaurant.find(:all, :origin => @location, :within => 2) . Hence I am trying to apply the where condition on @restaurant

[Rails] Performing nested queries in rails

2010-09-16 Thread vishy
urants = @restaurants.where("cuisine like ?", params[:cuisine]) if params[:cuisine] This results in an " undefined method `where' " error. I am not able to figure out how can I get this to work. I am using rails3 and ruby 1.9.2. Any help on this will be greatly appreciated.

[Rails] Updating instance variable

2009-06-25 Thread vishy
to implement a getter and setter method but I don't think I implemented it correctly or even if would help my cause here. If someone can point me in the right direction that will be great. Also I am a newbie to rails, i would like to apologize in advance in case this is a real fundamental mist

[Rails] Problem getting handle to a model attribute

2009-06-25 Thread vishy
t a getter and setter method but I don't think I implemented it correctly or even if would help my cause here. If someone can point me in the right direction that will be great. Also I am a newbie to rails, i would like to apologize in advance in case this is a real fundamental mist

[Rails] Displaying content using AJAX

2009-03-08 Thread vishy
tems are displayed. But thats where I am erring. link = params[:link] @items = Item.find_all_by_link_id(params[:link]) logger.debug "Items : " + @items.inspect page.replace_html :items, @items, :object => @items //controller.rb def link @links = Link.find(:all) end Any help will be gre

[Rails] Displaying content using rails

2009-03-07 Thread vishy
ms are displayed. But thats where I am //erring. link = params[:link] @items = Item.find_all_by_link_id(params[:link]) logger.debug "Items : " + @items.inspect page.replace_html :items, @items, :object => @items //controller.rb def link @links = Link.find(:all) end Any help will be gre

[Rails] 2 Issues - On load component hiding ; Separate find methods

2009-03-07 Thread vishy
e('%B %Y').upcase, archive_path (month.strftime('%Y'), month.strftime('%m'))%> <% end%> Any help here will be be greatly appreciated. Thanks, vishy --~--~-~--~~~---~--~~ You received this mes

[Rails] Re: Toggle single element in a page

2009-02-18 Thread vishy
how_comments', :entry => blogentry}%> and then in my rjs: entry = params[:entry] page["Comment_box_#{entry}"].toggle Thanks everyone for the help. Cheers, vishy On Feb 17, 7:09 am, Frederick Cheung wrote: > On Feb 17, 12:51 pm, vishy wrote: > > > Now the point w

[Rails] Re: Toggle single element in a page

2009-02-17 Thread vishy
I did go through some other posting and found that I can pass the object to link using something like: <%= link_to_remote pluralize(blogentry.comments.size, 'Comment'), :url => { :action => 'show_comments'}, :entry => blogentry %> and use the entry object but it

[Rails] Toggle single element in a page

2009-02-15 Thread vishy
to toggle the visibility for the comments of all the blog entries. However what I want to do is to toggle the comments only for the blog entry for which the comments link has been clicked. Any help in this regard with be greatly appreciated. Thanks, vishy --~--~-~--~~~