similar to: Rake routes & console showing one thing, app doing another

Displaying 20 results from an estimated 600 matches similar to: "Rake routes & console showing one thing, app doing another"

2007 Dec 28
1
Getting wrong route - fairly complete error description
OK, I have a routing problem, that seems to be working in the console, but not in the app. I have people that have nested tasks, like so: ------------------------------- # routes.rb map.resources :people do |person| person.resources :phone_notes person.resources :documents person.resources :tasks, :member => {:complete => :put} end map.resources :tasks, :member => {:complete =>
2007 Mar 23
11
Is there such a thing as button_to_remote?
I''ve changed my destructive link_to statements in favor of button_to. But what if I want to make an .rjs call with that button? Seems like we need something equivalent to link_to_remote, so that the button can make an ajax request instead submitting the form. Or am I missing the point entirely? Jeff --~--~---------~--~----~------------~-------~--~----~ You received this message
2006 Jul 24
2
:disable_with for button_to ???
With form_tag submit buttons I use the " :disable_with => ''button label while processing'' " option so that visitors with slow connections aren''t able to submit forms twice. How do I do the same thing with button_to? I''ve got several pages where there are multiple forms on the page being updated with Ajax so I can''t wrap the whole
2006 Mar 25
5
button_to with image?
I''m trying to use button_to and have it use an image in place of the submit button. I had figured it would work the same as link_to like so: button_to(image_tag("editicon", :size => "16x16", :border => 0), :action => ''edit'', :id => person.id) but this instead displays the image code as the button name. Surely there is a simple way to
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here: http://wiki.developers.facebook.com/index.php/Facebook_Styles I included testing and comments. I hope you find it useful. Curiously, it''s really a small extension of FBML. Richard -------------- next part -------------- Index: test/rails_integration_test.rb
2006 Jan 08
4
scaffold uses link_to for destroy
Hi, I wonder why scaffolding uses a link_to tag for the destroy links. Seems like these should be POST requests with button_to. The Rails book dedicates pages 335-337 to this very issue. Peter
2007 Feb 24
2
RESTful PUT and button_to
I''m working on a RESTful app, and I''ve hit a snag. Here''s a simplified example of the problem. (Excuse me if this example code isn''t strictly correct; I''m typing from memory.) Suppose I have a table which models a simple counter. It has a single column, "count": class CreateCounters < ActiveRecord::Migration def self.up
2006 May 18
6
Form actions with additional parameters
Hiall, I want to give the action of a form an additional parameters but can''t figure out how to do it. My code looks like this <%= start_form_tag :action => ''create'', next_step => true %> <%= render :partial => ''user_form'' %> <%= render :partial => ''community_form'' %> <%= submit_tag
2006 Jan 20
1
form_tag and multiple buttons inside problem
Hi, I have a bit of a problem with a form in rails. Well, the problem really is me not fully understanding the mechanism of the form_tag, so here''s what i try to do: The idea is to present a some edit fields for some @product attributes and then present a table showing the @product.pieces (pieces for every @product) and to include a "Edit Piece" and "Delete Piece"
2007 Sep 04
2
How can i add a confirmation dialog to a submit_tag?
When i use button_to or link_to, i can easily request a confirmation dialog with (for example) <%= button_to "Delete this story", { :controller => "story", :action => "delete", :id => @story.id }, :confirm => "Delete story: are you sure?" %> I also want to do this for the submit buttons on my forms, which are
2011 Jun 14
5
Buttons's routing
Hey My app has some buttons and i have route all to different action in router.rb file but click on each button results in same action. why? Am i missing to specify anything...) Rails:3.0.7 Thanks in advance. -- 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
2005 Aug 28
8
Save and delete buttons: POST vs. proximity dilemma
I''m in a dilemma: In order to keep GET requests from deleting objects, I''d like to use the button_to helper to get "something" that generates a POST request. Unfortunately, that something is a form and forms can''t be nested. I''d also like to place buttons related to the same form close to each other. At the top are some navigational buttons
2010 Jul 06
4
how to make confirm boxes conditional?
Hi, I''d like to make the :confirm option in my link_to/button_to erb elements conditional. So, if the page is in some state, no confirmation is requested, but not otherwise, etc. So far, my only (ugly) approach is to replace the linker html itself depending on changes in state, but I believe there must be an easier way to ''toggle'' the confirmation option on/off. Can
2006 Aug 18
4
Button on view
Hi, I have a page containing 3 views (2 are partials). One of the partials needs to have a button that will clear a table called "messages" in the database. I can put a button like this "<%= button_to "Clear Messages", :action => ''clear_messages'' %>" and have the controller do "Message.delete_all". But the problem is that the
2005 Nov 22
3
Idiom for submit button?
What is the rails idiom for submit buttons on forms? All other field types have helpers, but button_to creates its own form, so should not be used. I''ve looked in "Agile Web Dev. with Rails" but can''t see what I should do instead. Is this "difficult" because it runs counter to AJAX type forms? And, related, is there a way to ensure that hitting return in
2007 May 19
4
button_to_function with image?
Hi: does button_to_function allow the use of an image? I tried it in place of the text with "image_tag" and it doesn''t work. Maybe some form of button_to? Any direction you can give would be great! Mike -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups
2006 Mar 14
6
How to provide 2 actions to a form?
Hi, I have a form in rhtml. Now I have 2 buttons indside that form. Clicking on the first button action will be ''create'' & on second button action will be ''delete''. How to do this? Thanx Prash -- Posted via http://www.ruby-forum.com/.
2009 Dec 18
2
Undefined Method error - help request
Good morning All - I am working on a time tracking application as a learning excercise and have run into an error neither I nor Google can remedy. When loading my view, I get an error: ''undefined method ''true_class_path'' for #<ActionView::Base:......... Context: I have controllers for Project, Worktrack and ''Workbench'', among others. Workbench is
2008 May 11
2
UnKnownAction exception
Hi all, i''m new in ruby on rails. i created a controller which has 2 views index, add_to_cart & inside index i created "button_to" which references to add_to_cart view, but when i click on this button UnKnownAction exception appear to me, i don''t know why this happen --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2011 May 04
6
Form without scaffold ?
Hi Strange to Rails.Read the tutorial on Scaffold.Can i generate a Simple form without using Scaffold? John -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to